Group Operations#

group ov_ops_cpp_api

OpenVINO C++ API to create operations from different opsets. Such API is used to creation models from code, write transformations and traverse the model graph

class AUGRUCell : public ov::op::util::RNNCellBase
#include <augru_cell.hpp>

AUGRUCell operation.

Public Functions

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class AUGRUSequence : public ov::op::util::RNNCellBase
#include <augru_sequence.hpp>

AUGRUSequence operation.

Public Functions

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class RPE : public ov::op::Op
#include <rotary_positional_embeddings.hpp>

Rotary Positional Embeddings operation Internal operation which may change in the future.

Public Functions

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class Abs : public ov::op::util::UnaryElementwiseArithmetic
#include <abs.hpp>

Elementwise absolute value operation.

Public Functions

Abs() = default

Constructs an absolute value operation.

Abs(const Output<Node> &arg)

Constructs an absolute value operation.

Output [d1, ...]

Parameters:

argOutput that produces the input tensor.[d1, ...]

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Acos : public ov::op::util::UnaryElementwiseArithmetic
#include <acos.hpp>

Elementwise inverse cosine (arccos) operation.

Public Functions

Acos() = default

Constructs an arccos operation.

Acos(const Output<Node> &arg)

Constructs an arccos operation.

Output [d1, ...]

Parameters:

argOutput that produces the input tensor.[d1, ...]

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Acosh : public ov::op::util::UnaryElementwiseArithmetic
#include <acosh.hpp>

Elementwise inverse hyperbolic cos operation.

Public Functions

Acosh() = default

Constructs an Acosh operation.

Acosh(const Output<Node> &arg)

Constructs an Acosh operation.

Output [d1, ...]

Parameters:

argOutput that produces the input tensor.[d1, ...]

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class AdaptiveAvgPool : public ov::op::Op
#include <adaptive_avg_pool.hpp>

Adaptive average pooling operation.

Public Functions

AdaptiveAvgPool(const Output<Node> &data, const Output<Node> &output_shape)

Constructs adaptive average pooling operation.

Parameters:
  • dataInput data

  • output_shape – 1D tensor describing output shape for spatial dimensions.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class AdaptiveMaxPool : public ov::op::Op
#include <adaptive_max_pool.hpp>

Adaptive max pooling operation.

Public Functions

AdaptiveMaxPool(const Output<Node> &data, const Output<Node> &output_shape, const ov::element::Type &index_element_type = ov::element::i64)

Constructs adaptive max pooling operation.

Parameters:
  • dataInput data

  • output_shape – 1D tensor describing output shape for spatial dimensions.

  • index_element_type – Specifies the output tensor type for indices output

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class Add : public ov::op::util::BinaryElementwiseArithmetic
#include <add.hpp>

Elementwise addition operation.

Public Functions

inline Add()

Constructs an uninitialized addition operation.

Add(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))

Constructs an addition operation.

Output [d0, ...]

Parameters:
  • arg0Output that produces the first input tensor.[d0, ...]

  • arg1Output that produces the second input tensor.[d0, ...]

  • auto_broadcast – Auto broadcast specification. Default is Numpy-style implicit broadcasting.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Asin : public ov::op::util::UnaryElementwiseArithmetic
#include <asin.hpp>

Elementwise inverse sine (arcsin) operation.

Public Functions

Asin() = default

Constructs an arcsin operation.

Asin(const Output<Node> &arg)

Constructs an arcsin operation.

Output [d1, ...]

Parameters:

argOutput that produces the input tensor.[d1, ...]

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Assign : public ov::op::util::AssignBase
#include <assign.hpp>

Assign operation sets an input value to the variable with variable_id

Public Functions

Assign(const Output<Node> &new_value, const std::string &variable_id)

Constructs an Assign operation.

Parameters:
  • new_valueNode that produces the input tensor.

  • variable_id – identifier of the variable to be updated.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

inline virtual std::string get_variable_id() const override

Returns the identifier of corresponding variable.

class Assign : public ov::op::util::AssignBase
#include <assign.hpp>

Assign operation sets an input value to the variable with variable_id

Public Functions

Assign(const Output<Node> &new_value, const std::shared_ptr<util::Variable> &variable)

Constructs an Assign operation.

Parameters:
  • new_valueNode that produces the input tensor.

  • variable – Class for storing and synchronizing element types, shapes and identifiers between pairs of Assign/ReadValue nodes.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

inline virtual std::string get_variable_id() const override

Returns the identifier of corresponding variable.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Atan : public ov::op::util::UnaryElementwiseArithmetic
#include <atan.hpp>

Elementwise inverse tangent (arctan) operation.

Public Functions

Atan() = default

Constructs an arctan operation.

Atan(const Output<Node> &arg)

Constructs an arctan operation.

Output [d1, ...]

Parameters:

argOutput that produces the input tensor.[d1, ...]

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Atanh : public ov::op::util::UnaryElementwiseArithmetic
#include <atanh.hpp>

Elementwise inverse hyperbolic tangent operation.

Public Functions

Atanh() = default

Constructs an Atanh operation.

Atanh(const Output<Node> &arg)

Constructs an Atanh operation.

Output [d1, ...]

Parameters:

argOutput that produces the input tensor.[d1, ...]

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class AvgPool : public ov::op::util::AvgPoolBase
#include <avg_pool.hpp>

Batched average pooling operation.

Public Functions

AvgPool() = default

Constructs a batched average pooling operation.

AvgPool(const Output<Node> &arg, const Strides &strides, const Shape &pads_begin, const Shape &pads_end, const Shape &kernel, bool exclude_pad, RoundingType rounding_type = RoundingType::FLOOR, const PadType &auto_pad = PadType::EXPLICIT)

Constructs a batched average pooling operation.

Parameters:
  • arg – The output producing the input data batch tensor.[d1, dn]

  • strides – The strides.[n]

  • pads_begin – The beginning of padding shape.[n]

  • pads_end – The end of padding shape.[n]

  • kernel – The kernel shape.[n]

  • exclude_pad – If false then averages include padding elements, each treated as the number zero. If true, padding elements are entirely ignored when computing averages.

  • rounding_type – Whether to use ceiling or floor rounding type while computing output shape.

  • auto_pad – Padding type to use for additional padded dimensions

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class AvgPool : public ov::op::util::AvgPoolBase
#include <avg_pool.hpp>

Batched average pooling operation.

Public Functions

AvgPool() = default

Constructs a batched average pooling operation.

AvgPool(const Output<Node> &arg, const Strides &strides, const Shape &pads_begin, const Shape &pads_end, const Shape &kernel, bool exclude_pad, RoundingType rounding_type = RoundingType::FLOOR, const PadType &auto_pad = PadType::EXPLICIT)

Constructs a batched average pooling operation.

Parameters:
  • arg – The output producing the input data batch tensor.[d1, dn]

  • strides – The strides.[n]

  • pads_begin – The beginning of padding shape.[n]

  • pads_end – The end of padding shape.[n]

  • kernel – The kernel shape.[n]

  • exclude_pad – If false then averages include padding elements, each treated as the number zero. If true, padding elements are entirely ignored when computing averages.

  • rounding_type – Whether to use ceiling or floor rounding type while computing output shape.

  • auto_pad – Padding type to use for additional padded dimensions

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class BatchNormInference : public ov::op::Op
#include <batch_norm.hpp>

BatchNormInference operation.

Public Functions

BatchNormInference(const Output<Node> &input, const Output<Node> &gamma, const Output<Node> &beta, const Output<Node> &mean, const Output<Node> &variance, double epsilon)
Parameters:
  • input – [., C, …]

  • gamma – gamma scaling for normalized value. [C]

  • beta – bias added to the scaled normalized value [C]

  • mean – value for mean normalization [C]

  • variance – value for variance normalization [C]

  • epsilon – Avoids divsion by 0 if input has 0 variance

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class BatchNormInference : public ov::op::Op
#include <batch_norm.hpp>

BatchNormInference operation.

Public Functions

BatchNormInference(const Output<Node> &input, const Output<Node> &gamma, const Output<Node> &beta, const Output<Node> &mean, const Output<Node> &variance, double epsilon)
Parameters:
  • input – [., C, …]

  • gamma – gamma scaling for normalized value. [C]

  • beta – bias added to the scaled normalized value [C]

  • mean – value for mean normalization [C]

  • variance – value for variance normalization [C]

  • epsilon – Avoids divsion by 0 if input has 0 variance

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class BatchToSpace : public ov::op::Op
#include <batch_to_space.hpp>

BatchToSpace permutes data from the batch dimension of the data tensor into spatial dimensions.

Note

Values from the batch dimension are moved in spatial blocks dimensions.

   Output node produces a tensor with shape:
   `[batch / (block_shape[0] * block_shape[1] * ... * block_shape[N - 1]),
    D_1 * block_shape[1] - crops_begin[1] - crops_end[1],
    D_2 * block_shape[2] - crops_begin[2] - crops_end[2], ...,
    D_{N - 1} * block_shape[N - 1] - crops_begin[N - 1] - crops_end[N - 1]`
    of the same type as `data` input.

Public Functions

BatchToSpace(const Output<Node> &data, const Output<Node> &block_shape, const Output<Node> &crops_begin, const Output<Node> &crops_end)

Constructs a BatchToSpace operation.

Parameters:
  • dataNode producing the data tensor

  • block_shape – The sizes of the block of values to be moved

  • crops_begin – Specifies the amount to crop from the beginning along each axis of data input

  • crops_end – Specifies the amount to crop from the ending along each axis of data input.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class BinaryConvolution : public ov::op::util::ConvolutionFwdPropBase
#include <binary_convolution.hpp>

BinaryConvolution operation.

Public Functions

BinaryConvolution() = default

Constructs a binary convolution operation.

BinaryConvolution(const Output<Node> &data, const Output<Node> &kernel, const Strides &strides, const CoordinateDiff &pads_begin, const CoordinateDiff &pads_end, const Strides &dilations, BinaryConvolutionMode mode, float pad_value, const PadType &auto_pad = PadType::EXPLICIT)

Constructs a binary convolution operation.

Output [N, C_OUT, R1, ... Rf]

Parameters:
  • data – The node producing the input data batch tensor.

  • kernel – The node producing the filters tensor.

  • strides – The strides.

  • pads_begin – The beginning of padding shape.

  • pads_end – The end of padding shape.

  • dilations – The dilations.

  • mode – Defines how input tensor 0/1 values and weights 0/1 are interpreted.

  • pad_value – Floating-point value used to fill pad area.

  • auto_pad – The pad type for automatically computing padding sizes.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

inline const BinaryConvolutionMode &get_mode() const
Returns:

The mode of convolution.

inline float get_pad_value() const
Returns:

The pad value.

class BitwiseAnd : public ov::op::util::BinaryElementwiseBitwise
#include <bitwise_and.hpp>

Elementwise bitwise AND operation.

Public Functions

BitwiseAnd() = default

Constructs a bitwise AND operation.

BitwiseAnd(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))

Constructs a bitwise AND operation.

Output [d0, ...]

Parameters:
  • arg0Output that produces the first input tensor.[d0, ...]

  • arg1Output that produces the second input tensor.[d0, ...]

  • auto_broadcast – Auto broadcast specification. Default is Numpy-style implicit broadcasting.

class BitwiseNot : public ov::op::Op
#include <bitwise_not.hpp>

Elementwise bitwise negation operation.

Public Functions

BitwiseNot() = default

Constructs a bitwise negation operation.

BitwiseNot(const Output<Node> &arg)

Constructs a bitwise negation operation.

Parameters:

argNode that produces the input tensor.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class BitwiseOr : public ov::op::util::BinaryElementwiseBitwise
#include <bitwise_or.hpp>

Elementwise bitwise OR operation.

Public Functions

BitwiseOr() = default

Constructs a bitwise OR operation.

BitwiseOr(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))

Constructs a bitwise OR operation.

Output [d0, ...]

Parameters:
  • arg0Output that produces the first input tensor.[d0, ...]

  • arg1Output that produces the second input tensor.[d0, ...]

  • auto_broadcast – Auto broadcast specification. Default is Numpy-style implicit broadcasting.

class BitwiseXor : public ov::op::util::BinaryElementwiseBitwise
#include <bitwise_xor.hpp>

Elementwise bitwise XOR operation.

Public Functions

BitwiseXor() = default

Constructs a bitwise XOR operation.

BitwiseXor(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))

Constructs a bitwise XOR operation.

Output [d0, ...]

Parameters:
  • arg0Output that produces the first input tensor.[d0, ...]

  • arg1Output that produces the second input tensor.[d0, ...]

  • auto_broadcast – Auto broadcast specification. Default is Numpy-style implicit broadcasting.

class Broadcast : public ov::op::util::BroadcastBase
#include <broadcast.hpp>

Operation which “adds” axes to an input tensor, replicating elements from the input as needed along the new axes.

Public Functions

Broadcast() = default

Constructs a broadcast operation.

Broadcast(const Output<Node> &arg, const Output<Node> &target_shape, const Output<Node> &axes_mapping, const BroadcastModeSpec &broadcast_spec = BroadcastType::EXPLICIT)

Constructs a broadcast operation.

Parameters:
  • arg – The input tensor to be broadcast.

  • target_shape – The shape of the output tensor.

  • axes_mapping – The axis positions (0-based) in the result that correspond to input axes. ‘Arg’ tensor is broadcast along the remaining axes. E.g., Input Shape - [3, 4], Target Shape - [3, 5, 4, 4] axes_mapping - [0, 2] => Broadcast along axes 1 and 3. axes_mapping - [0, 3] => Broadcast along axes 1 and 2.

  • broadcast_specBroadcast specification to use for determining broadcast axes. ‘axes_mapping’ should not be provided if mode other than explicit (none) is used.

Broadcast(const Output<Node> &arg, const Output<Node> &target_shape, const BroadcastModeSpec &broadcast_spec = BroadcastType::NUMPY)

Constructs a broadcast operation.

Parameters:
  • arg – The input tensor to be broadcast.

  • target_shape – The shape of the output tensor.

  • broadcast_specBroadcast specification to use for determining broadcast axes

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

virtual std::pair<bool, AxisSet> get_broadcast_axes() const override
Returns:

true and the AxisSet if broadcast axes can be fully determined.

virtual bool evaluate(ov::TensorVector &outputs, const ov::TensorVector &inputs) const override

Evaluates the op on input_values putting results in output_values.

Parameters:
  • output_values – Tensors for the outputs to compute. One for each result

  • input_values – Tensors for the inputs. One for each inputs.

Returns:

true if successful

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Broadcast : public ov::op::util::BroadcastBase
#include <broadcast.hpp>

Operation which “adds” axes to an input tensor, replicating elements from the input as needed along the new axes.

Public Functions

Broadcast() = default

Constructs a broadcast operation.

Broadcast(const Output<Node> &arg, const Output<Node> &target_shape, const Output<Node> &axes_mapping, const AutoBroadcastSpec &broadcast_spec = AutoBroadcastSpec())

Constructs a broadcast operation.

Parameters:
  • arg – The input tensor to be broadcast.

  • target_shape – The shape of the output tensor.

  • axes_mapping – The axis positions (0-based) in the result that correspond to input axes. ‘Arg’ tensor is broadcast along the remaining axes. E.g., Input Shape - [3, 4], Target Shape - [3, 5, 4, 4] axes_mapping - [0, 2] => Broadcast along axes 1 and 3. axes_mapping - [0, 3] => Broadcast along axes 1 and 2.

  • broadcast_specBroadcast specification to use for determining broadcast axes. ‘axes_mapping’ is ignored if broadcast_spec is not NONE

Broadcast(const Output<Node> &arg, const Output<Node> &target_shape, const AutoBroadcastSpec &broadcast_spec = AutoBroadcastSpec(AutoBroadcastType::NUMPY))

Constructs a broadcast operation.

Parameters:
  • arg – The input tensor to be broadcast.

  • target_shape – The shape of the output tensor.

  • broadcast_specBroadcast specification to use for determining broadcast axes

inline const AutoBroadcastSpec &get_broadcast_spec() const
Returns:

Broadcast Specification.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

virtual bool evaluate(ov::TensorVector &outputs, const ov::TensorVector &inputs) const override

Evaluates the op on input_values putting results in output_values.

Parameters:
  • output_values – Tensors for the outputs to compute. One for each result

  • input_values – Tensors for the inputs. One for each inputs.

Returns:

true if successful

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Bucketize : public ov::op::Op
#include <bucketize.hpp>

Operation that bucketizes the input based on boundaries.

Public Functions

Bucketize(const Output<Node> &data, const Output<Node> &buckets, const element::Type output_type = element::i64, const bool with_right_bound = true)

Constructs a Bucketize node.

Parameters:
  • dataInput data to bucketize

  • buckets – 1-D of sorted unique boundaries for buckets

  • output_typeOutput tensor type, “i64” or “i32”, defaults to i64

  • with_right_bound – indicates whether bucket includes the right or left edge of interval. default true = includes right edge

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class Ceiling : public ov::op::util::UnaryElementwiseArithmetic
#include <ceiling.hpp>

Elementwise ceiling operation.

Public Functions

Ceiling() = default

Constructs a ceiling operation.

Ceiling(const Output<Node> &arg)

Constructs a ceiling operation.

Parameters:

argNode that produces the input tensor.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Clamp : public ov::op::util::UnaryElementwiseArithmetic
#include <clamp.hpp>

Performs a clipping operation on all elements of the input node.

All input values that are outside of the <min;max> range are set to ‘min’ or ‘max’ depending on which side of the <min;max> range they are. The values that fall into this range remain unchanged.

Public Functions

Clamp(const Output<Node> &data, const double min, const double max)

Constructs a Clamp node.

Parameters:
  • data – - Node producing the input tensor

  • min – - the lower bound of the <min;max> range

  • max – - the upper bound of the <min;max> range

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Col2Im : public ov::op::Op
#include <col2im.hpp>

Operator combining sliding blocks into an image tensor.

Public Functions

Col2Im(const Output<Node> &data, const Output<Node> &output_size, const Output<Node> &kernel_size, const Strides &strides = Strides{1, 1}, const Strides &dilations = Strides{1, 1}, const Shape &pads_begin = Shape{0, 0}, const Shape &pads_end = Shape{0, 0})

Constructs a Col2Im operation.

Parameters:
  • dataInput tensor with data

  • output_sizeShape of the spatial dimensions of the output image

  • kernel_size – Size of the sliding blocks

  • strides – Stride in the sliding blocks in the input spatial dimensions

  • dilations – Local stride of the elements

  • pads_begin – Paddings at the beginning of each spatial axis, if undefined no padding is applied

  • pads_end – Paddings at the end of each spatial axis, if undefined no padding is applied

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class Concat : public ov::op::Op
#include <concat.hpp>

Concatenation operation.

Public Functions

Concat() = default

Constructs a concatenation operation.

Concat(const OutputVector &args, int64_t axis)

Constructs a concatenation operation.

Parameters:
  • args – The outputs producing the input tensors.

  • axis – The axis along which to concatenate the input tensors.

Concat(const NodeVector &args, int64_t axis)

Constructs a concatenation operation.

Parameters:
  • args – The nodes producing the input tensors.

  • axis – The axis along which to concatenate the input tensors.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

inline int64_t get_concatenation_axis() const
Returns:

The concatenation axis.

inline int64_t get_axis() const
Returns:

The concatenation axis.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Constant : public ov::op::Op
#include <constant.hpp>

Class for constants.

Public Functions

Constant(const ov::Tensor &tensor)

Initialize a constant from ov::Tensor.

Parameters:

tensor – The ov::Tensor with data

template<typename T>
inline Constant(const element::Type &type, const Shape &shape, const std::vector<T> &values)

Constructs a tensor constant.

Parameters:
  • type – The element type of the tensor constant.

  • shape – The shape of the tensor constant.

  • values – A vector of literals for initializing the tensor constant. The size of values must match the size of the shape.

Constant(const element::Type &type, const Shape &shape)

Create uninitialized constant.

template<class T, class = typename std::enable_if<std::is_fundamental<T>::value>::type>
inline Constant(const element::Type &type, const Shape &shape, T value)

Constructs a uniform tensor constant.

Parameters:
  • type – The element type of the tensor constant.

  • shape – The shape of the tensor constant.

  • value – A scalar for initializing the uniform tensor constant. The value is broadcast to the specified shape.

Constant(const element::Type &type, const Shape &shape, const std::vector<std::string> &values)

Constructs a tensor constant This constructor is mainly to support deserialization of constants.

Parameters:
  • type – The element type of the tensor constant.

  • shape – The shape of the tensor constant.

  • values – A list of string values to use as the constant data.

Constant(const element::Type &type, const Shape &shape, const void *data)

Constructs a tensor constant with the supplied data.

Parameters:
  • type – The element type of the tensor constant.

  • shape – The shape of the tensor constant.

  • data – A void* to constant data.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

virtual bool evaluate(ov::TensorVector &outputs, const ov::TensorVector &inputs) const override

Evaluates the op on input_values putting results in output_values.

Parameters:
  • output_values – Tensors for the outputs to compute. One for each result

  • input_values – Tensors for the inputs. One for each inputs.

Returns:

true if successful

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

Shape get_shape_val() const

Returns the value of the constant node as a Shape object Can only be used on element::i64 nodes and interprets negative values as zeros.

Strides get_strides_val() const

Returns the value of the constant node as a Strides object Can only be used on element::i64 nodes and interprets negative values as zeros.

Coordinate get_coordinate_val() const

Returns the value of the constant node as a Coordinate object Can only be used on element::i64 nodes and interprets negative values as zeros.

CoordinateDiff get_coordinate_diff_val() const

Returns the value of the constant node as a CoordinateDiff object Can only be used on element::i64 nodes.

AxisVector get_axis_vector_val() const

Returns the value of the constant node as an AxisVector object Can only be used on element::i64 nodes and interprets negative values as zeros.

AxisSet get_axis_set_val() const

Returns the value of the constant node as an AxisSet object Can only be used on element::i64 nodes and interprets negative values as zeros. Repeated values are allowed.

size_t get_byte_size() const

Return data size in bytes.

std::vector<std::string> get_value_strings() const
Returns:

The initialization literals for the tensor constant.

template<typename T>
inline std::vector<T> cast_vector(int64_t num_elements = -1) const

Return the Constant’s value as a vector cast to type T.

Template Parameters:

T – Type to which data vector’s entries will be cast.

Parameters:

num_elements – (Optional) Number of elements to cast. In default case returns all elements

Returns:

Constant’s data vector.

Public Static Functions

template<typename T>
static inline std::shared_ptr<Constant> create(const element::Type &type, const Shape &shape, const std::vector<T> &values)

Wrapper around constructing a shared_ptr of a Constant.

Parameters:
  • type – The element type of the tensor constant.

  • shape – The shape of the tensor constant.

  • values – A vector of values to use as the constant data.

template<typename T>
static inline std::shared_ptr<Constant> create(const element::Type &type, const Shape &shape, std::initializer_list<T> values)

Wrapper around constructing a shared_ptr of a Constant.

Parameters:
  • type – The element type of the tensor constant.

  • shape – The shape of the tensor constant.

  • values – An initializer_list of values to use as the constant data.

static inline std::shared_ptr<Constant> create(const element::Type &type, const Shape &shape, const void *memory)

Wrapper around constructing a shared_ptr of a Constant.

Parameters:
  • type – The element type of the tensor constant.

  • shape – The shape of the tensor constant.

  • memory – An continues memory chunk which contains the constant data.

class Convert : public ov::op::Op
#include <convert.hpp>

Elementwise type conversion operation.

Public Functions

Convert() = default

Constructs a conversion operation.

Convert(const Output<Node> &arg, const ov::element::Type &destination_type)

Constructs a conversion operation.

Parameters:
  • argNode that produces the input tensor.

  • destination_type – Element type for the output tensor.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class ConvertLike : public ov::op::Op
#include <convert_like.hpp>

Elementwise type conversion operation.

Public Functions

ConvertLike() = default

Constructs a conversion operation.

ConvertLike(const Output<Node> &data, const Output<Node> &like)

Constructs a conversion operation.

Parameters:
  • dataNode that produces the input tensor.

  • likeNode which provides the target type information for the conversion.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class ConvertPromoteTypes : public ov::op::Op
#include <convert_promote_types.hpp>

Elementwise operation that promote and convert input types to one common datatype.

Public Functions

ConvertPromoteTypes() = default

Constructs operation that promote and convert input types to one common datatype.

ConvertPromoteTypes(const Output<Node> &input_0, const Output<Node> &input_1, const bool promote_unsafe = false, const bool pytorch_scalar_promotion = false, const element::Type &u64_integer_promotion_target = element::f32)

Constructs operation that promote and convert input types to one common datatype.

Parameters:
  • input_0Node with datatype to be promoted.

  • input_1Node with datatype to be promoted.

  • promote_unsafe – Bool attribute whether to allow promotions that might result in bit-widening, precision loss and undefined behaviors.

  • pytorch_scalar_promotion – Bool attribute whether to promote scalar input to type provided by non-scalar input when number format is matching.

  • u64_integer_promotion_target – Element type attribute to select promotion result for u64 and signed integers.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

bool get_pytorch_scalar_promotion() const

Get bool attribute whether to promote scalar input to type provided by non-scalar input when number format is matching.

void set_pytorch_scalar_promotion(bool pytorch_scalar_promotion)

Set bool attribute whether to promote scalar input to type provided by non-scalar input when number format is matching.

bool get_promote_unsafe() const

Get bool attribute whether to allow promotions that might result in bit-widening, precision loss and undefined behaviors.

void set_promote_unsafe(bool promote_unsafe)

Set bool attribute whether to allow promotions that might result in bit-widening, precision loss and undefined behaviors.

const element::Type &get_u64_integer_promotion_target() const

Get element type attribute to select promotion result for u64 and signed integers.

void set_u64_integer_promotion_target(const element::Type &u64_integer_promotion_target)

Set element type attribute to select promotion result for u64 and signed integers.

class Convolution : public ov::op::util::ConvolutionFwdPropBase
#include <convolution.hpp>

Batched convolution operation, with optional window dilation and stride.

Public Functions

Convolution() = default

Constructs a batched convolution operation.

Convolution(const Output<Node> &data_batch, const Output<Node> &filters, const Strides &strides, const CoordinateDiff &pads_begin, const CoordinateDiff &pads_end, const Strides &dilations, const PadType &auto_pad = PadType::EXPLICIT)

Constructs a batched convolution operation.

Output [N, C_OUT, R1, ... Rf]

Parameters:
  • data_batch – The node producing the input data batch tensor.[N, C_IN, D1, ... Df]

  • filters – The node producing the filters tensor.[C_OUT, C_IN, F1, ... Ff]

  • strides – The strides.[f]

  • dilations – The dilations.[f]

  • pads_begin – The beginning of padding shape.[f]

  • pads_end – The end of padding shape.[f]

  • auto_pad – The pad type for automatically computing padding sizes.[f]

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class ConvolutionBackpropData : public ov::op::util::ConvolutionBackPropBase
#include <convolution.hpp>

Data batch backprop for batched convolution operation.

Public Functions

ConvolutionBackpropData() = default

Constructs a batched-convolution data batch-backprop operation.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

const PartialShape get_output_shape() const
Returns:

The output spatial dimensions shape.

class Cos : public ov::op::util::UnaryElementwiseArithmetic
#include <cos.hpp>

Elementwise cosine operation.

Public Functions

Cos() = default

Constructs a cosine operation.

Cos(const Output<Node> &arg)

Constructs a cosine operation.

Parameters:

argNode that produces the input tensor.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Cosh : public ov::op::util::UnaryElementwiseArithmetic
#include <cosh.hpp>

Elementwise hyperbolic cosine (cosh) operation.

Public Functions

Cosh() = default

Constructs a hyperbolic cosine operation.

Cosh(const Output<Node> &arg)

Constructs a hyperbolic cosine operation.

Parameters:

argNode that produces the input tensor.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class CTCGreedyDecoder : public ov::op::Op
#include <ctc_greedy_decoder.hpp>

CTCGreedyDecoder operation.

Public Functions

CTCGreedyDecoder(const Output<Node> &input, const Output<Node> &seq_len, const bool ctc_merge_repeated)

Constructs a CTCGreedyDecoder operation.

Parameters:
  • input – Logits on which greedy decoding is performed

  • seq_len – Sequence lengths

  • ctc_merge_repeated – Whether to merge repeated labels

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class CTCGreedyDecoderSeqLen : public ov::op::Op
#include <ctc_greedy_decoder_seq_len.hpp>

Operator performing CTCGreedyDecoder.

Public Functions

CTCGreedyDecoderSeqLen(const Output<Node> &input, const Output<Node> &seq_len, const bool merge_repeated = true, const element::Type &classes_index_type = element::i32, const element::Type &sequence_length_type = element::i32)

Constructs a CTCGreedyDecoderSeqLen operation.

Parameters:
  • input – 3-D tensor of logits on which greedy decoding is performed

  • seq_len – 1-D tensor of sequence lengths

  • merge_repeated – Whether to merge repeated labels

  • classes_index_type – Specifies the output classes_index tensor type

  • sequence_length_type – Specifies the output sequence_length tensor type

CTCGreedyDecoderSeqLen(const Output<Node> &input, const Output<Node> &seq_len, const Output<Node> &blank_index, const bool merge_repeated = true, const element::Type &classes_index_type = element::i32, const element::Type &sequence_length_type = element::i32)

Constructs a CTCGreedyDecoderSeqLen operation.

Parameters:
  • input – 3-D tensor of logits on which greedy decoding is performed

  • seq_len – 1-D tensor of sequence lengths

  • blank_index – Scalar or 1-D tensor with 1 element used to mark a blank index

  • merge_repeated – Whether to merge repeated labels

  • classes_index_type – Specifies the output classes_index tensor type

  • sequence_length_type – Specifies the output sequence_length tensor type

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

inline bool get_merge_repeated() const

Get merge_repeated attribute.

Returns:

Current value of merge_repeated attribute

inline void set_merge_repeated(bool merge_repeated)

Set merge_repeated attribute.

Parameters:

merge_repeated – A new value for the attribute

inline const element::Type &get_classes_index_type() const

Get classes_index_type attribute.

Returns:

Current value of classes_index_type attribute

inline void set_classes_index_type(const element::Type &classes_index_type)

Set classes_index_type attribute.

Parameters:

classes_index_type – Type of classes_index

inline const element::Type &get_sequence_length_type() const

Get sequence_length_type attribute.

Returns:

Current value of sequence_length_type attribute

inline void set_sequence_length_type(const element::Type &sequence_length_type)

Set sequence_length_type attribute.

Parameters:

sequence_length_type – Type of sequence length

class CTCLoss : public ov::op::Op
#include <ctc_loss.hpp>

CTCLoss operation.

Public Functions

CTCLoss(const Output<Node> &logits, const Output<Node> &logit_length, const Output<Node> &labels, const Output<Node> &label_length, const bool preprocess_collapse_repeated = false, const bool ctc_merge_repeated = true, const bool unique = false)

Constructs a CTCLoss operation.

Parameters:
  • logits – 3-D tensor of logits

  • logit_length – 1-D tensor of length for each object from a batch

  • labels – 2-D tensor of labels for which likelyhood is estimated using logist

  • label_length – 1-D tensor of length for each label sequence

  • blank_index – Scalar used to mark a blank index

  • preprocess_collapse_repeated – Flag for preprocessing labels before loss calculation

  • ctc_merge_repeated – Flag for merging repeated characters in a potential alignment

  • unique – Flag to find unique elements in a target before matching with alignment

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class CumSum : public ov::op::Op
#include <cum_sum.hpp>

Tensor cumulative sum operation.

Compute the cumulative sum of the input tensor along the axis specified.

Public Functions

CumSum() = default

Constructs a cumulative summation operation.

CumSum(const Output<Node> &arg, const Output<Node> &axis, const bool exclusive = false, const bool reverse = false)

Constructs a cumulative summation operation.

Parameters:
  • arg – The tensor to be summed.

  • axis – zero dimension tensor specifying axis position along which cumulative sum must be performed

  • exclusive – if set to true, the top element is not included

  • reverse – if set to true, will perform the sums in reverse direction

CumSum(const Output<Node> &arg, const bool exclusive = false, const bool reverse = false)

Constructs a cumulative summation operation with axis = 0.

Parameters:

arg – The tensor to be summed

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class DeformableConvolution : public ov::op::util::DeformableConvolutionBase
#include <deformable_convolution.hpp>

DeformableConvolution operation.

Public Functions

DeformableConvolution() = default

Constructs a conversion operation.

DeformableConvolution(const Output<Node> &arg, const Output<Node> &offsets, const Output<Node> &filters, const Strides &strides, const CoordinateDiff &pads_begin, const CoordinateDiff &pads_end, const Strides &dilations, const PadType &auto_pad = PadType::EXPLICIT, const int64_t group = 1, const int64_t deformable_group = 1)

Constructs a conversion operation.

Parameters:
  • argNode that produces the input tensor.

  • offsetsNode producing the deformable values tensor.

  • filtersNode producing the filters(kernels) tensor with OIZYX layout.

  • stridesConvolution strides.

  • pads_begin – Amount of padding to be added to the beginning along each axis. For example in case of a 2D input the value of (1, 2) means that 1 element will be added to the top and 2 elements to the left.

  • pads_end – Amount of padding to be added to the end along each axis.

  • dilations – The distance in width and height between the weights in the filters tensor.

  • auto_pad – Specifies how the automatic calculation of padding should be done.

  • group – The number of groups which both output and input should be split into.

  • deformable_group – The number of groups which deformable values and output should be split into along the channel axis.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class DeformableConvolution : public ov::op::util::DeformableConvolutionBase
#include <deformable_convolution.hpp>

DeformableConvolution operation.

Public Functions

DeformableConvolution() = default

Constructs a conversion operation.

DeformableConvolution(const Output<Node> &arg, const Output<Node> &offsets, const Output<Node> &filters, const Strides &strides, const CoordinateDiff &pads_begin, const CoordinateDiff &pads_end, const Strides &dilations, const PadType &auto_pad = PadType::EXPLICIT, const int64_t group = 1, const int64_t deformable_group = 1, const bool bilinear_interpolation_pad = false)

Constructs a conversion operation.

Parameters:
  • argNode that produces the input tensor.

  • offsetsNode producing the deformable values tensor.

  • filtersNode producing the filters(kernels) tensor with OIZYX layout.

  • strides – Convolution strides.

  • pads_begin – Amount of padding to be added to the beginning along each axis. For example in case of a 2D input the value of (1, 2) means that 1 element will be added to the top and 2 elements to the left.

  • pads_end – Amount of padding to be added to the end along each axis.

  • dilations – The distance in width and height between the weights in the filters tensor.

  • auto_pad – Specifies how the automatic calculation of padding should be done.

  • group – The number of groups which both output and input should be split into.

  • deformable_group – The number of groups which deformable values and output should be split into along the channel axis.

  • bilinear_interpolation_pad – The flag that determines the mode of bilinear interpolation execution. If the flag is true and the sampling location is within one pixel outside of the feature map boundary, then bilinear interpolation is performed on the zero padded feature map. If the flag is false and the sampling location is within one pixel outside of the feature map boundary, then the sampling location shifts to the inner boundary of the feature map.`

DeformableConvolution(const Output<Node> &arg, const Output<Node> &offsets, const Output<Node> &filters, const Output<Node> &mask, const Strides &strides, const CoordinateDiff &pads_begin, const CoordinateDiff &pads_end, const Strides &dilations, const PadType &auto_pad = PadType::EXPLICIT, const int64_t group = 1, const int64_t deformable_group = 1, const bool bilinear_interpolation_pad = false)

Constructs a conversion operation.

Parameters:
  • argNode that produces the input tensor.

  • offsetsNode producing the deformable values tensor.

  • filtersNode producing the filters(kernels) tensor with OIZYX layout.

  • maskNode producing the mask(mask) tensor.

  • strides – Convolution strides.

  • pads_begin – Amount of padding to be added to the beginning along each axis. For example in case of a 2D input the value of (1, 2) means that 1 element will be added to the top and 2 elements to the left.

  • pads_end – Amount of padding to be added to the end along each axis.

  • dilations – The distance in width and height between the weights in the filters tensor.

  • auto_pad – Specifies how the automatic calculation of padding should be done.

  • group – The number of groups which both output and input should be split into.

  • deformable_group – The number of groups which deformable values and output should be split into along the channel axis.

  • bilinear_interpolation_pad – The flag that determines the mode of bilinear interpolation execution. If the flag is true and the sampling location is within one pixel outside of the feature map boundary, then bilinear interpolation is performed on the zero padded feature map. If the flag is false and the sampling location is within one pixel outside of the feature map boundary, then the sampling location shifts to the inner boundary of the feature map.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class DeformablePSROIPooling : public ov::op::Op
#include <deformable_psroi_pooling.hpp>

DeformablePSROIPooling operation.

Public Functions

DeformablePSROIPooling(const Output<Node> &input, const Output<Node> &coords, const Output<Node> &offsets, const int64_t output_dim, const float spatial_scale, const int64_t group_size = 1, const std::string mode = "bilinear_deformable", int64_t spatial_bins_x = 1, int64_t spatial_bins_y = 1, float trans_std = 1, int64_t part_size = 1)

Constructs a DeformablePSROIPooling operation.

Parameters:
  • inputInput tensor with position sensitive score maps

  • coordsInput tensor with list of five element tuples describing ROI coordinates

  • offsetsInput tensor with transformation values

  • output_dim – Pooled output channel number

  • group_size – Number of horizontal bins per row to divide ROI area, it defines output width and height

  • spatial_scale – Multiplicative spatial scale factor to translate ROI coordinates from their input scale to the scale used when pooling

  • mode – Specifies mode for pooling.

  • spatial_bins_x – Specifies numbers of bins to divide ROI single bin over width

  • spatial_bins_y – Specifies numbers of bins to divide ROI single bin over height

  • no_trans – The flag that specifies whenever third input exists and contains transformation (offset) values

  • trans_std – The value that all transformation (offset) values are multiplied with

  • part_size – The number of parts the output tensor spatial dimensions are divided into. Basically it is the height and width of the third input

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class DepthToSpace : public ov::op::Op
#include <depth_to_space.hpp>

DepthToSpace permutes data from the depth dimension of the input blob into spatial dimensions.

Output node produces a tensor with shape: [N, C/(blocksize * blocksize), H * blocksize, W * blocksize]

Note

Values from the depth dimension (assuming NCHW layout) are moved in spatial blocks to the height and width dimensions.

Public Functions

DepthToSpace(const Output<Node> &data, const DepthToSpaceMode &mode, std::size_t block_size = 1)

Constructs a DepthToSpace operation.

Parameters:
  • dataNode producing the input tensor

  • mode – Specifies how the input depth dimension is split to block coordinates

  • block_size – The size of the block of values to be moved

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class DFT : public ov::op::util::FFTBase
#include <dft.hpp>

An operation DFT that computes the discrete Fourier transformation.

Public Functions

DFT(const Output<Node> &data, const Output<Node> &axes)

Constructs a DFT operation. DFT is performed for full size axes.

Parameters:
  • dataInput data

  • axes – Axes to perform DFT

DFT(const Output<Node> &data, const Output<Node> &axes, const Output<Node> &signal_size)

Constructs a DFT operation.

Parameters:
  • dataInput data

  • axes – Axes to perform DFT

  • signal_size – Signal sizes for ‘axes’

class Divide : public ov::op::util::BinaryElementwiseArithmetic
#include <divide.hpp>

Elementwise division operation.

Public Functions

inline Divide()

Constructs a division operation.

Divide(const Output<Node> &arg0, const Output<Node> &arg1, bool pythondiv, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))

Constructs a division operation.

Parameters:
  • arg0Node that produces the first input tensor.

  • arg1Node that produces the second input tensor.

  • pythondiv – Use Python style rounding for integral type

  • auto_broadcast – Auto broadcast specification

Divide(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))

Constructs a division operation.

Parameters:
  • arg0Node that produces the first input tensor.

  • arg1Node that produces the second input tensor.

  • auto_broadcast – Auto broadcast specification

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Einsum : public ov::op::Op
#include <einsum.hpp>

Einsum operation.

Public Functions

Einsum(const OutputVector &inputs, const std::string &equation)

Constructs Einsum operation.

Parameters:
  • inputsInput nodes on which Einsum operation performs contraction

  • equation – Einstein summation convention

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

void set_equation(std::string equation)

Set Einsum equation.

Parameters:

equation – Equation string to be set.

inline const std::string &get_equation() const

Get an equation of Einsum operation.

Returns:

Einsum equation

Public Static Functions

static void parse_equation(const std::string &equation, std::vector<std::string> &input_subscripts, std::string &output_subscript)

Check correctness of equation format and extract input subscripts and output subscript.

Parameters:
  • equation – Equation to be parsed and checked

  • input_subscripts – A vector of extracted input subscripts

  • output_subscript – An output subscript

static std::vector<std::string> extract_labels(const std::string &subscript)

Extract labels (from subscript) that can be alphabetic letters or ellipsis.

Parameters:

subscript – Subscript

Returns:

A vector of extracted labels from the input subscript in the order of appearence

class Elu : public ov::op::util::UnaryElementwiseArithmetic
#include <elu.hpp>

Exponential Linear Unit x < 0 => f(x) = alpha * (exp(x) - 1.) x >= 0 => f(x) = x.

Public Functions

Elu(const Output<Node> &data, const double alpha)

Constructs an Elu operation.

Parameters:
  • dataInput tensor

  • alpha – Multiplier for negative values

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class EmbeddingSegmentsSum : public ov::op::Op
#include <embedding_segments_sum.hpp>

Returns embeddings for given indices.

Public Functions

EmbeddingSegmentsSum() = default

Constructs a EmbeddingSegmentsSum operation.

EmbeddingSegmentsSum(const Output<Node> &emb_table, const Output<Node> &indices, const Output<Node> &segment_ids, const Output<Node> &num_segments, const Output<Node> &default_index, const Output<Node> &per_sample_weights)

Constructs a EmbeddingSegmentsSum operation.

EmbeddingSegmentsSum constructs an output tensor by replacing every index in a given input tensor with a row (from the weights matrix) at that index

Parameters:
  • 'emb_table' – tensor containing the embedding lookup table of the module of shape [num_emb, emb_dim1, emb_dim2, …] and of type T

  • 'indices' – tensor of shape [num_indices] and of type T_IND. Required

  • <tt>segment_ids</tt> – tensor of shape [num_indices] and of type T_IND with indices into the output Tensor. Values should be sorted and can be repeated. Required.

  • <tt>num_segments</tt> – scalar of type T_IND indicating the number of segments. Required.

  • 'default_index' – scalar of type T_IND containing default index in embedding table to fill empty “bags”. If not provided empty “bags” are filled with zeros. Optional.

  • 'per_sample_weights' – tensor of the same shape as indices and of type T. Each value in this tensor are multiplied with each value pooled from embedding table for each index. Optional.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class EmbeddingBagOffsets : public ov::op::util::EmbeddingBagOffsetsBase
#include <embeddingbag_offsets.hpp>

Returns embeddings for given indices.

Public Functions

EmbeddingBagOffsets() = default

Constructs a EmbeddingBagOffsets operation.

EmbeddingBagOffsets(const Output<Node> &emb_table, const Output<Node> &indices, const Output<Node> &offsets, const Output<Node> &default_index, const Output<Node> &per_sample_weights, const Reduction &reduction = Reduction::SUM)

Constructs a EmbeddingBagOffsets operation.

EmbeddingBagOffsets constructs an output tensor by replacing every index in a given input tensor with a row (from the weights matrix) at that index

Parameters:
  • emb_table – tensor containing the embedding lookup table of the module of shape [num_emb, emb_dim1, emb_dim2, …] and of type T

  • indices – tensor of shape [num_indices] and of type T_IND. Required

  • offsets – tensor of shape [batch] and of type T_IND containing the starting index positions of each “bag” in indices. Required.

  • default_index – scalar of type T_IND containing default index in embedding table to fill empty “bags”. If not provided empty “bags” are filled with zeros. Optional.

  • per_sample_weigths – tensor of the same shape as indices and of type T. Each value in this tensor are multiplied with each value pooled from embedding table for each index. Optional.

class EmbeddingBagOffsetsSum : public ov::op::util::EmbeddingBagOffsetsBase
#include <embeddingbag_offsets_sum.hpp>

Returns embeddings for given indices.

Public Functions

EmbeddingBagOffsetsSum() = default

Constructs a EmbeddingBagOffsetsSum operation.

EmbeddingBagOffsetsSum(const Output<Node> &emb_table, const Output<Node> &indices, const Output<Node> &offsets, const Output<Node> &default_index, const Output<Node> &per_sample_weights)

Constructs a EmbeddingBagOffsetsSum operation.

EmbeddingBagOffsetsSum constructs an output tensor by replacing every index in a given input tensor with a row (from the weights matrix) at that index

Parameters:
  • emb_table – tensor containing the embedding lookup table of the module of shape [num_emb, emb_dim1, emb_dim2, …] and of type T

  • indices – tensor of shape [num_indices] and of type T_IND. Required

  • offsets – tensor of shape [batch] and of type T_IND containing the starting index positions of each “bag” in indices. Required.

  • default_index – scalar of type T_IND containing default index in embedding table to fill empty “bags”. If not provided empty “bags” are filled with zeros. Optional.

  • per_sample_weights – tensor of the same shape as indices and of type T. Each value in this tensor are multiplied with each value pooled from embedding table for each index. Optional.

class EmbeddingBagPacked : public ov::op::util::EmbeddingBagPackedBase
#include <embeddingbag_packed.hpp>

Returns embeddings for given indices.

Public Functions

EmbeddingBagPacked() = default

Constructs a EmbeddingBagPacked operation.

EmbeddingBagPacked(const Output<Node> &emb_table, const Output<Node> &indices, const Output<Node> &per_sample_weights, const Reduction &reduction = Reduction::SUM)

Constructs a EmbeddingBagPacked operation.

EmbeddingBagPacked constructs an output tensor by replacing every index in a given input tensor with a row (from the weights matrix) at that index

Parameters:
  • emb_tableTensor containing the embedding lookup table of the module of shape [num_emb, emb_dim1, emb_dim2, …] and of type T

  • indicesTensor of shape [batch, indices_per_bag] and of type T_IND. Required.

  • per_sample_weigths – tensor of the same shape as indices and of type T. Each value in this tensor are multiplied with each value pooled from embedding table for each index. Optional.

class EmbeddingBagPackedSum : public ov::op::util::EmbeddingBagPackedBase
#include <embeddingbag_packedsum.hpp>

Returns embeddings for given indices.

Public Functions

EmbeddingBagPackedSum() = default

Constructs a EmbeddingBagPackedSum operation.

EmbeddingBagPackedSum(const Output<Node> &emb_table, const Output<Node> &indices, const Output<Node> &per_sample_weights)

Constructs a EmbeddingBagPackedSum operation.

EmbeddingBagPackedSum constructs an output tensor by replacing every index in a given input tensor with a row (from the weights matrix) at that index

Parameters:
  • emb_tableTensor containing the embedding lookup table of the module of shape [num_emb, emb_dim1, emb_dim2, …] and of type T

  • indicesTensor of shape [batch, indices_per_bag] and of type T_IND. Required.

  • per_sample_weigths – tensor of the same shape as indices and of type T. Each value in this tensor are multiplied with each value pooled from embedding table for each index. Optional.

class Equal : public ov::op::util::BinaryElementwiseComparison
#include <equal.hpp>

Elementwise is-equal operation.

Inputs

Type

Description

arg0

\(E[d_1,\dots,d_n]~(n \geq 0)\)

A tensor of any shape and element type.

arg1

\(E[d_1,\dots,d_n]~(n \geq 0)\)

A tensor of the same shape and element type as arg0.

autob

AutoBroadcastSpec

Auto broadcast specification.

Type

Description

\(\texttt{bool}[d_1,\dots,d_n]\)

The tensor \(T\), where \(T[i_1,\dots,i_n] = 1\text{ if }\texttt{arg0}[i_1,\dots,i_n] = \texttt{arg1}[i_1,\dots,i_n]\text{, else } 0\)

Public Functions

inline Equal()

Constructs an equal operation.

Equal(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))

Constructs an equal operation.

Parameters:
  • arg0Node that produces the first input tensor.

  • arg1Node that produces the second input tensor.

  • auto_broadcast – Auto broadcast specification

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Erf : public ov::op::util::UnaryElementwiseArithmetic
#include <erf.hpp>

Elementwise erf operation.

Public Functions

Erf() = default

Constructs a floor operation.

Erf(const Output<Node> &arg)

Constructs a floor operation.

Parameters:

argNode that produces the input tensor.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Exp : public ov::op::util::UnaryElementwiseArithmetic
#include <exp.hpp>

Elementwise natural exponential (exp) operation.

Public Functions

Exp() = default

Constructs an exponential operation.

Exp(const Output<Node> &arg)

Constructs an exponential operation.

Parameters:

argNode that produces the input tensor.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class ExperimentalDetectronDetectionOutput : public ov::op::Op
#include <experimental_detectron_detection_output.hpp>

An operation ExperimentalDetectronDetectionOutput performs non-maximum suppression to generate the detection output using information on location and score predictions.

Public Functions

ExperimentalDetectronDetectionOutput(const Output<Node> &input_rois, const Output<Node> &input_deltas, const Output<Node> &input_scores, const Output<Node> &input_im_info, const Attributes &attrs)

Constructs a ExperimentalDetectronDetectionOutput operation.

Parameters:
  • input_roisInput rois

  • input_deltasInput deltas

  • input_scoresInput scores

  • input_im_infoInput image info

  • attrsAttributes attributes

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

inline const Attributes &get_attrs() const

Returns attributes of the operation ExperimentalDetectronDetectionOutput.

void set_attrs(Attributes attrs)

Set the attributes of the operation ExperimentalDetectronDetectionOutput.

Parameters:

attrsAttributes to set.

struct Attributes
#include <experimental_detectron_detection_output.hpp>

Structure that specifies attributes of the operation.

class ExperimentalDetectronGenerateProposalsSingleImage : public ov::op::Op
#include <experimental_detectron_generate_proposals.hpp>

An operation ExperimentalDetectronGenerateProposalsSingleImage computes ROIs and their scores based on input data.

Public Functions

ExperimentalDetectronGenerateProposalsSingleImage(const Output<Node> &im_info, const Output<Node> &anchors, const Output<Node> &deltas, const Output<Node> &scores, const Attributes &attrs)

Constructs a ExperimentalDetectronGenerateProposalsSingleImage operation.

Parameters:
  • im_infoInput image info

  • anchorsInput anchors

  • deltasInput deltas

  • scoresInput scores

  • attrs – Operation attributes

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

struct Attributes
#include <experimental_detectron_generate_proposals.hpp>

Structure that specifies attributes of the operation.

class ExperimentalDetectronPriorGridGenerator : public ov::op::Op
#include <experimental_detectron_prior_grid_generator.hpp>

An operation ExperimentalDetectronPriorGridGenerator generates prior grids of specified sizes.

Public Functions

ExperimentalDetectronPriorGridGenerator(const Output<Node> &priors, const Output<Node> &feature_map, const Output<Node> &im_data, const Attributes &attrs)

Constructs a ExperimentalDetectronDetectionOutput operation.

Parameters:
  • priorsInput priors

  • feature_mapInput feature map

  • im_data – Image data

  • attrs – attributes

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

inline const Attributes &get_attrs() const

Returns attributes of this operation.

void set_attrs(Attributes attrs)

Set the attributes of the operation ExperimentalDetectronPriorGridGenerator.

Parameters:

attrsAttributes to set.

struct Attributes
#include <experimental_detectron_prior_grid_generator.hpp>

Structure that specifies attributes of the operation.

class ExperimentalDetectronROIFeatureExtractor : public ov::op::Op
#include <experimental_detectron_roi_feature.hpp>

An operation ExperimentalDetectronROIFeatureExtractor is the ROIAlign operation applied over a feature pyramid.

Public Functions

ExperimentalDetectronROIFeatureExtractor(const OutputVector &args, const Attributes &attrs)

Constructs a ExperimentalDetectronROIFeatureExtractor operation.

Parameters:
ExperimentalDetectronROIFeatureExtractor(const NodeVector &args, const Attributes &attrs)

Constructs a ExperimentalDetectronROIFeatureExtractor operation.

Parameters:
virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

inline const Attributes &get_attrs() const

Returns attributes of the operation.

void set_attrs(Attributes attrs)

Set the ExperimentalDetectronROIFeatureExtractor’s attributes.

Parameters:

attrsAttributes to set.

struct Attributes
#include <experimental_detectron_roi_feature.hpp>

Structure that specifies attributes of the operation.

class ExperimentalDetectronTopKROIs : public ov::op::Op
#include <experimental_detectron_topkrois.hpp>

An operation ExperimentalDetectronTopKROIs, according to the repository is TopK operation applied to probabilities of input ROIs.

Public Functions

ExperimentalDetectronTopKROIs(const Output<Node> &input_rois, const Output<Node> &rois_probs, size_t max_rois = 0)

Constructs a ExperimentalDetectronTopKROIs operation.

Parameters:
  • input_roisInput rois

  • rois_probs – Probabilities for input rois

  • max_rois – Maximal numbers of output rois

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class ExtractImagePatches : public ov::op::Op
#include <extractimagepatches.hpp>

ExtractImagePatches operation.

Public Functions

ExtractImagePatches(const Output<Node> &image, const Shape &sizes, const Strides &strides, const Shape &rates, const PadType &auto_pad)

Constructs a ExtractImagePatches operation.

Parameters:
  • data – 4-D Input data to extract image patches

  • sizes – Patch size in the format of [size_rows, size_cols]

  • strides – Patch movement stride in the format of [stride_rows, stride_cols]

  • rates – Element seleciton rate for creating a patch. in the format of [rate_rows, rate_cols]

  • auto_pad – Padding type. it can be any value from valid, same_lower, same_upper

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class Eye : public ov::op::Op
#include <eye.hpp>

Tensor Eye operation.

Public Functions

Eye(const Output<Node> &num_rows, const Output<Node> &num_columns, const Output<Node> &diagonal_index, const Output<Node> &batch_shape, const ov::element::Type &out_type)

Constructs a Eye operation.

Parameters:
  • num_rowsNode producing the tensor with row number.

  • num_columnsNode producing the tensor with column number.

  • diagonal_indexNode producing the tensor with the index of diagonal with ones.

  • batch_shapeNode producing the tensor with batch shape.

  • out_typeOutput type of the tensor.

Eye(const Output<Node> &num_rows, const Output<Node> &num_columns, const Output<Node> &diagonal_index, const ov::element::Type &out_type)

Constructs a Eye operation without batch_shape.

Parameters:
  • num_rowsNode producing the tensor with row number.

  • num_columnsNode producing the tensor with column number.

  • diagonal_indexNode producing the tensor with the index of diagonal with ones.

  • out_typeOutput type of the tensor.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

inline const ov::element::Type &get_out_type() const
Returns:

The output tensor type.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class FakeConvert : public ov::op::Op
#include <fake_convert.hpp>

FakeConvert performs element-wise quantization of input values into a set of values corresponding to a target low-precision type.

Note

FakeConvert is an experimental operation and subject to change.

Public Functions

FakeConvert(const ov::Output<ov::Node> &data, const ov::Output<ov::Node> &scale, std::string destination_type = "f8e4m3")

Constructs FakeConvert operation (default shift).

Parameters:
  • data – The input data tensor.

  • scaleTensor with a scale factor for the data input.

  • destination_type – The low precision type to be emulated.

FakeConvert(const ov::Output<ov::Node> &data, const ov::Output<ov::Node> &scale, const ov::Output<ov::Node> &shift, std::string destination_type = "f8e4m3")

Constructs FakeConvert operation.

Parameters:
  • data – The input data tensor.

  • scaleTensor with a scale factor for the data input.

  • shiftTensor with a shift factor for the data input.

  • destination_type – The low precision type to be emulated.

FakeConvert(const ov::Output<ov::Node> &data, const ov::Output<ov::Node> &scale, const ov::element::Type &destination_type)

Constructs FakeConvert operation (default shift).

Parameters:
  • data – The input data tensor.

  • scaleTensor with a scale factor for the data input.

  • destination_type – The low precision type to be emulated.

FakeConvert(const ov::Output<ov::Node> &data, const ov::Output<ov::Node> &scale, const ov::Output<ov::Node> &shift, const ov::element::Type &destination_type)

Constructs FakeConvert operation.

Parameters:
  • data – The input data tensor.

  • scaleTensor with a scale factor for the data input.

  • shiftTensor with a shift factor for the data input.

  • destination_type – The low precision type to be emulated.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class FakeQuantize : public ov::op::Op
#include <fake_quantize.hpp>

Class performing element-wise linear quantization.

Note

Input floating point values are quantized into a discrete set of floating point values.

Public Functions

FakeQuantize(const Output<Node> &data, const Output<Node> &input_low, const Output<Node> &input_high, const Output<Node> &output_low, const Output<Node> &output_high, std::size_t levels, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))

Constructs a FakeQuantize operation node.

Parameters:
  • data[in] The input data tensor.

  • input_low[in] The minimum limit for input values.

  • input_high[in] The maximum limit for input values.

  • output_low[in] The minimum quantized value.

  • output_high[in] The maximum quantized value.

  • levels[in] The number of quantization levels.

  • auto_broadcast[in] AutoBroadcast mode to be used for broadcasting limit values

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Floor : public ov::op::util::UnaryElementwiseArithmetic
#include <floor.hpp>

Elementwise floor operation.

Public Functions

Floor() = default

Constructs a floor operation.

Floor(const Output<Node> &arg)

Constructs a floor operation.

Parameters:

argNode that produces the input tensor.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class FloorMod : public ov::op::util::BinaryElementwiseArithmetic
#include <floor_mod.hpp>

Elementwise FloorMod operation.

Public Functions

inline FloorMod()

Constructs an uninitialized addition operation.

FloorMod(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastType::NUMPY)

Constructs an Floor Mod operation.

Output [d0, ...]

Parameters:
  • arg0Output that produces the first input tensor.[d0, ...]

  • arg1Output that produces the second input tensor.[d0, ...]

  • auto_broadcast – Auto broadcast specification

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Gather : public ov::op::util::GatherBase
#include <gather.hpp>

Gather slices from axis of data according to indices.

Public Functions

Gather(const Output<Node> &params, const Output<Node> &indices, const Output<Node> &axis)
Parameters:
  • data – The tensor from which slices are gathered

  • indicesTensor with indexes to gather

  • axis – The tensor is a dimension index to gather data from

class Gather : public ov::op::util::GatherBase
#include <gather.hpp>

Gather slices from axis of data according to indices.

Public Functions

Gather(const Output<Node> &data, const Output<Node> &indices, const Output<Node> &axis, const int64_t batch_dims = 0)
Parameters:
  • data – The tensor from which slices are gathered

  • indicesTensor with indexes to gather

  • axis – The tensor is a dimension index to gather data from

  • batch_dims – The number of batch dimension in data and indices tensors. If batch_dims = 0 Gather v7 is identical to Gather v1.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class Gather : public ov::op::util::GatherBase
#include <gather.hpp>

Gather slices from axis of data according to indices. Negative indices are supported and indicate reverse indexing from the end.

Subclassed by ov::op::internal::GatherCompressed

Public Functions

Gather(const Output<Node> &data, const Output<Node> &indices, const Output<Node> &axis, const int64_t batch_dims = 0)
Parameters:
  • data – The tensor from which slices are gathered

  • indicesTensor with indexes to gather

  • axis – The tensor is a dimension index to gather data from

  • batch_dims – The number of batch dimension in data and indices tensors.

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class GatherElements : public ov::op::Op
#include <gather_elements.hpp>

GatherElements operation.

Public Functions

GatherElements(const Output<Node> &data, const Output<Node> &indices, const int64_t axis)

Constructs a GatherElements operation.

Parameters:
  • dataNode producing data that are gathered

  • indicesNode producing indices by which the operation gathers elements

  • axis – specifies axis along which indices are specified

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class GatherND : public ov::op::util::GatherNDBase
#include <gather_nd.hpp>

GatherND operation.

Public Functions

GatherND(const Output<Node> &data, const Output<Node> &indices, const size_t batch_dims = 0)

Constructs a GatherND operation.

Parameters:
  • dataNode producing data that are gathered

  • indicesNode producing indices by which the operation gathers elements or slices from data

  • batch_dims – Specifies a number of batch dimensions

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class GatherND : public ov::op::util::GatherNDBase
#include <gather_nd.hpp>

GatherND operation.

Public Functions

GatherND(const Output<Node> &data, const Output<Node> &indices, const size_t batch_dims = 0)

Constructs a GatherND operation.

Parameters:
  • dataNode producing data that are gathered

  • indicesNode producing indices by which the operation gathers elements or slices from data

  • batch_dims – Specifies a number of batch dimensions

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class GatherTree : public ov::op::Op
#include <gather_tree.hpp>

Generates the complete beams from the ids per each step and the parent beam ids.

Public Functions

GatherTree(const Output<Node> &step_ids, const Output<Node> &parent_idx, const Output<Node> &max_seq_len, const Output<Node> &end_token)
Parameters:
  • step_idsTensor of shape [MAX_TIME, BATCH_SIZE, BEAM_WIDTH] with indices from per each step

  • parent_idxTensor of shape [MAX_TIME, BATCH_SIZE, BEAM_WIDTH] with parent beam indices

  • max_seq_lenTensor of shape [BATCH_SIZE] with maximum lengths for each sequence in the batch

  • end_tokenTensor of shape [MAX_TIME, BATCH_SIZE, BEAM_WIDTH]

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class Gelu : public ov::op::util::UnaryElementwiseArithmetic
#include <gelu.hpp>

Gaussian Error Linear Unit f(x) = 0.5 * x * (1 + erf( x / sqrt(2) )

Public Functions

Gelu(const Output<Node> &data)

Constructs a Gelu operation.

Parameters:

dataInput tensor

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

class Gelu : public ov::op::util::UnaryElementwiseArithmetic
#include <gelu.hpp>

Gaussian Error Linear Unit f(x) = 0.5 * x * (1 + erf( x / sqrt(2) ) for “approximation” = “erf” f(x) = 0.5 * x * (1 + tanh([sqrt(2 / pi)] * [x + 0.044715^3]) for “approximation” = “tanh”.

Public Functions

Gelu(const Output<Node> &data, GeluApproximationMode mode = GeluApproximationMode::ERF)

Constructs a Gelu operation.

Parameters:
  • dataInput tensor

  • mode – Approximation mode

virtual void validate_and_infer_types() override

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class Greater : public ov::op::util::BinaryElementwiseComparison
#include <greater.hpp>

Elementwise greater-than operation.

Public Functions

inline Greater()

Constructs a greater-than operation.

Greater(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))

Constructs a greater-than operation.

Parameters:
  • arg0Node that produces the first input tensor.

  • arg1Node that produces the second input tensor.

  • auto_broadcast – Auto broadcast specification

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class GreaterEqual : public ov::op::util::BinaryElementwiseComparison
#include <greater_eq.hpp>

Elementwise greater-than-or-equal operation.

Public Functions

inline GreaterEqual()

Constructs a greater-than-or-equal operation.

GreaterEqual(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))

Constructs a greater-than-or-equal operation.

Parameters:
  • arg0Node that produces the first input tensor.

  • arg1Node that produces the second input tensor.

  • auto_broadcast – Auto broadcast specification

virtual bool has_evaluate() const override

Allows to get information about availability of evaluate method for the current operation.

class GridSample : public ov::op::Op
#include <grid_sample.hpp>

Operator performing interpolated sampling of the input tensor.

Public Functions

GridSample(const Output<Node> &data, const Output<Node> &grid, const Attributes &attributes)

Constructs