namespace ov::op::v1

Overview

namespace v1 {

// classes

class Add;
class AvgPool;
class BatchToSpace;
class BinaryConvolution;
class Broadcast;
class ConvertLike;
class Convolution;
class ConvolutionBackpropData;
class DeformableConvolution;
class DeformablePSROIPooling;
class Divide;
class Equal;
class FloorMod;
class Gather;
class GatherTree;
class Greater;
class GreaterEqual;
class GroupConvolution;
class GroupConvolutionBackpropData;
class Less;
class LessEqual;
class LogicalAnd;
class LogicalNot;
class LogicalOr;
class LogicalXor;
class MaxPool;
class Maximum;
class Minimum;
class Mod;
class Multiply;
class NonMaxSuppression;
class NotEqual;
class OneHot;
class Pad;
class Power;
class ReduceLogicalAnd;
class ReduceLogicalOr;
class ReduceMax;
class ReduceMean;
class ReduceMin;
class ReduceProd;
class ReduceSum;
class Reshape;
class Reverse;
class Select;
class Softmax;
class SpaceToBatch;
class Split;
class StridedSlice;
class Subtract;
class TopK;
class Transpose;
class VariadicSplit;

// global functions

template <class TShape, class TContainer, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const AvgPool \* op,
    const std::vector<TShape>& input_shapes,
    TContainer& pads_begin,
    TContainer& pads_end
    );

template <class TShape, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const BatchToSpace \* op,
    const std::vector<TShape>& input_shapes,
    const ITensorAccessor& tensor_accessor = make_tensor_accessor()
    );

template <class T, class TRShape = result_shape_t<T>>
std::vector<TRShape> shape_infer(
    const ov::op::v1::Broadcast \* op,
    const std::vector<T>& input_shapes,
    const ITensorAccessor& ta = make_tensor_accessor()
    );

template <class TShape, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const ConvolutionBackpropData \* op,
    const std::vector<TShape>& input_shapes,
    CoordinateDiff& pads_begin,
    CoordinateDiff& pads_end,
    const ITensorAccessor& ta = make_tensor_accessor()
    );

template <
    class TOp,
    class TShape,
    class TRShape = result_shape_t<TShape>,
    typename std::enable_if<std::is_same<TOp, Convolution>::value||std::is_same<TOp, BinaryConvolution>::value>::type \* = nullptr
    >
std::vector<TRShape> shape_infer(
    const TOp \* op,
    const std::vector<TShape>& input_shapes,
    CoordinateDiff& pads_begin,
    CoordinateDiff& pads_end
    );

template <class TShape, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const DeformableConvolution \* op,
    const std::vector<TShape>& input_shapes,
    CoordinateDiff& pads_begin,
    CoordinateDiff& pads_end
    );

template <class TShape, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const DeformablePSROIPooling \* op,
    const std::vector<TShape>& input_shapes
    );

template <class TShape, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const GatherTree \* op,
    const std::vector<TShape>& input_shapes
    );

template <class TShape, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const GroupConvolutionBackpropData \* op,
    const std::vector<TShape>& input_shapes,
    CoordinateDiff& pads_begin,
    CoordinateDiff& pads_end,
    const ITensorAccessor& ta = make_tensor_accessor()
    );

template <class TShape, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const GroupConvolution \* op,
    const std::vector<TShape>& input_shapes,
    CoordinateDiff& pads_begin,
    CoordinateDiff& pads_end
    );

template <class TShape, class TContainer, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const MaxPool \* op,
    const std::vector<TShape>& input_shapes,
    TContainer& pads_begin,
    TContainer& pads_end
    );

template <class T, class TRShape = result_shape_t<T>>
std::vector<TRShape> shape_infer(
    const NonMaxSuppression \* op,
    const std::vector<T>& input_shapes,
    const ITensorAccessor& ta = make_tensor_accessor()
    );

void resolve_axis(OneHot \* op);

template <class T, class TRShape = result_shape_t<T>>
std::vector<TRShape> shape_infer(
    const OneHot \* op,
    const std::vector<T>& input_shapes,
    const ITensorAccessor& ta = make_tensor_accessor()
    );

template <class TShape, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const Reverse \* op,
    const std::vector<TShape>& input_shapes,
    const ITensorAccessor& tensor_accessor = make_tensor_accessor()
    );

template <class TShape, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const Select \* op,
    const std::vector<TShape>& input_shapes
    );

template <class TShape, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const SpaceToBatch \* op,
    const std::vector<TShape>& input_shapes,
    const ITensorAccessor& ta = make_tensor_accessor()
    );

template <typename T, class TRShape = result_shape_t<T>>
std::vector<TRShape> shape_infer(
    const Split \* op,
    const std::vector<T>& input_shapes,
    const ITensorAccessor& ta = make_tensor_accessor()
    );

template <class T, class TRShape = result_shape_t<T>>
std::vector<TRShape> shape_infer(
    const StridedSlice \* op,
    const std::vector<T>& input_shapes,
    const ITensorAccessor& ta = make_tensor_accessor()
    );

template <class T, class TRShape = result_shape_t<T>>
TRShape calc_output_shape(
    const Transpose \*const op,
    const T& input_shape,
    std::vector<int64_t>& axes_order
    );

template <class TShape, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const Transpose \* op,
    const std::vector<TShape>& input_shapes,
    const ITensorAccessor& tensor_accessor = make_tensor_accessor()
    );

template <typename T, class TRShape = result_shape_t<T>>
std::vector<TRShape> shape_infer(
    const VariadicSplit \* op,
    const std::vector<T>& input_shapes,
    const ITensorAccessor& ta = make_tensor_accessor()
    );

} // namespace v1

Detailed Documentation

Global Functions

template <class TShape, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const Reverse \* op,
    const std::vector<TShape>& input_shapes,
    const ITensorAccessor& tensor_accessor = make_tensor_accessor()
    )

Reverse shape inference.

Parameters:

TShape

Type of shape.

op

Pointer to Reverse operator.

input_shapes

Input shapes of Reverse.

constant_data

Map of constant data. Default empty.

Returns:

Vector of output shapes with one shape.

template <typename T, class TRShape = result_shape_t<T>>
std::vector<TRShape> shape_infer(
    const Split \* op,
    const std::vector<T>& input_shapes,
    const ITensorAccessor& ta = make_tensor_accessor()
    )

Shape inference for Split V1 operator.

The split operation cause label lost on splitted dimension even if number of splits is one, because in this case split will be removed by transformation (as NOP) and in fact label will be propagated.

Parameters:

T

Type of shape.

op

Split operator pointer.

input_shapes

Split input shapes.

ta

Tensor accessor to constant data.

template <class T, class TRShape = result_shape_t<T>>
TRShape calc_output_shape(
    const Transpose \*const op,
    const T& input_shape,
    std::vector<int64_t>& axes_order
    )

Calculate transpose output shape.

Parameters:

T

Type of shape

op

Transpose operator pointer.

input_shape

Transpose input shape.

axes_order

Transpose axes order (modified if empty).

Returns:

Output shape

template <class TShape, class TRShape = result_shape_t<TShape>>
std::vector<TRShape> shape_infer(
    const Transpose \* op,
    const std::vector<TShape>& input_shapes,
    const ITensorAccessor& tensor_accessor = make_tensor_accessor()
    )

Do transpose shape inference on input and output shapes.

Parameters:

TShape

Type of input shapes.

TRShape

Type of return shapes.

op

Transpose operator pointer.

input_shapes

Input shapes of transpose.

tensor_accessor

Accessor to constant data.