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.
-
virtual void validate_and_infer_types() override#
-
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.
-
virtual void validate_and_infer_types() override#
-
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:
arg – Output 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.
-
Abs() = default#
-
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:
arg – Output 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.
-
Acos() = default#
-
class Acosh : public ov::op::util::UnaryElementwiseArithmetic#
- #include <acosh.hpp>
Elementwise inverse hyperbolic cos 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:
data – Input 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.
-
AdaptiveAvgPool(const Output<Node> &data, const Output<Node> &output_shape)#
-
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:
data – Input 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.
-
AdaptiveMaxPool(const Output<Node> &data, const Output<Node> &output_shape, const ov::element::Type &index_element_type = ov::element::i64)#
-
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, ...]
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
inline Add()#
-
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:
arg – Output 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.
-
Asin() = default#
-
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_value – Node 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.
-
Assign(const Output<Node> &new_value, const std::string &variable_id)#
-
class Assign : public ov::op::util::AssignBase#
- #include <assign.hpp>
Assign operation sets an input value to the variable with
variable_id
Public Functions
Constructs an Assign operation.
- Parameters:
new_value – Node 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:
arg – Output 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.
-
Atan() = default#
-
class Atanh : public ov::op::util::UnaryElementwiseArithmetic#
- #include <atanh.hpp>
Elementwise inverse hyperbolic tangent 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.
-
AvgPool() = default#
-
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.
-
AvgPool() = default#
-
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.
-
BatchNormInference(const Output<Node> &input, const Output<Node> &gamma, const Output<Node> &beta, const Output<Node> &mean, const Output<Node> &variance, double epsilon)#
-
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.
-
BatchNormInference(const Output<Node> &input, const Output<Node> &gamma, const Output<Node> &beta, const Output<Node> &mean, const Output<Node> &variance, double epsilon)#
-
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:
data – Node 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
inputcrops_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.
-
BatchToSpace(const Output<Node> &data, const Output<Node> &block_shape, const Output<Node> &crops_begin, const Output<Node> &crops_end)#
-
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.
-
BinaryConvolution() = default#
-
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, ...]
-
BitwiseAnd() = default#
-
class BitwiseLeftShift : public ov::op::util::BinaryElementwiseBitwise#
- #include <bitwise_left_shift.hpp>
Elementwise bitwise BitwiseLeftShift operation.
Public Functions
-
BitwiseLeftShift() = default#
Constructs a bitwise BitwiseLeftShift operation.
-
BitwiseLeftShift(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs a bitwise BitwiseLeftShift operation.
Output
[d0, ...]
-
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.
-
BitwiseLeftShift() = default#
-
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:
arg – Node 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.
-
BitwiseNot() = default#
-
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, ...]
-
BitwiseOr() = default#
-
class BitwiseRightShift : public ov::op::util::BinaryElementwiseBitwise#
- #include <bitwise_right_shift.hpp>
Elementwise bitwise BitwiseRightShift operation.
Public Functions
-
BitwiseRightShift() = default#
Constructs a bitwise BitwiseRightShift operation.
-
BitwiseRightShift(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs a bitwise BitwiseRightShift operation.
Output
[d0, ...]
-
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.
-
BitwiseRightShift() = default#
-
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, ...]
-
BitwiseXor() = default#
-
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_spec – Broadcast 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_spec – Broadcast 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.
-
Broadcast() = default#
-
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_spec – Broadcast 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_spec – Broadcast 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.
-
Broadcast() = default#
-
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.
-
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.
-
Bucketize(const Output<Node> &data, const Output<Node> &buckets, const element::Type output_type = element::i64, const bool with_right_bound = true)#
-
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:
arg – Node that produces the input tensor.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Ceiling() = default#
-
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.
-
Clamp(const Output<Node> &data, const double min, const double max)#
-
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:
data – Input tensor with data
output_size – Shape 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.
-
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})#
-
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.
-
Concat() = default#
-
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.
-
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.
Construct a tensor constant from shared memory.
The Constant can take ownership of shared memory if provided shared object is not null and manges memory lifetime.
- Parameters:
type – The element type of the tensor constant.
shape – The shape of the tensor constant.
data – The pointer to shared memory.
so – The shared object to take it ownership.
-
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, typename std::enable_if<!std::is_same<bool, T>::value>::type* = nullptr>
inline std::vector<T> get_vector() const# Get constant buffer as vector of element type T.
For low precision the vector do not perform bit unpacks. The returned vector has N elements where:
N is (elements count * (precision byte size / T byte size)) for standard precisions.
N is (byte size) for low precisions.
-
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.
-
const Tensor get_tensor_view() const#
Get view on constant data as tensor.
- Returns:
ov::Tensor with constant data.
Public Static Functions
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.
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.
-
Constant(const ov::Tensor &tensor)#
-
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:
arg – Node 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.
-
Convert() = default#
-
class ConvertLike : public ov::op::Op#
- #include <convert_like.hpp>
Elementwise type conversion operation.
Public Functions
-
ConvertLike() = default#
Constructs a conversion 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.
-
ConvertLike() = default#
-
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_0 – Node with datatype to be promoted.
input_1 – Node 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.
-
ConvertPromoteTypes() = default#
-
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.
-
Convolution() = default#
-
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.
-
ConvolutionBackpropData() = default#
-
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:
arg – Node that produces the input tensor.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Cos() = default#
-
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:
arg – Node that produces the input tensor.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Cosh() = default#
-
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.
-
CTCGreedyDecoder(const Output<Node> &input, const Output<Node> &seq_len, const bool ctc_merge_repeated)#
-
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
-
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)#
-
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.
-
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)#
-
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.
-
CumSum() = default#
-
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:
arg – Node that produces the input tensor.
offsets – Node producing the deformable values tensor.
filters – Node 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.
-
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.
-
DeformableConvolution() = default#
-
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:
arg – Node that produces the input tensor.
offsets – Node producing the deformable values tensor.
filters – Node 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 isfalse
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:
arg – Node that produces the input tensor.
offsets – Node producing the deformable values tensor.
filters – Node producing the filters(kernels) tensor with OIZYX layout.
mask – Node 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 isfalse
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.
-
DeformableConvolution() = default#
-
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:
input – Input tensor with position sensitive score maps
coords – Input tensor with list of five element tuples describing ROI coordinates
offsets – Input 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.
-
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)#
-
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:
data – Node 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.
-
DepthToSpace(const Output<Node> &data, const DepthToSpaceMode &mode, std::size_t block_size = 1)#
-
class DFT : public ov::op::util::FFTBase#
- #include <dft.hpp>
An operation DFT that computes the discrete Fourier transformation.
-
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.
-
Divide(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs a division operation.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
inline Divide()#
-
class Einsum : public ov::op::Op#
- #include <einsum.hpp>
Einsum 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.
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
-
virtual void validate_and_infer_types() override#
-
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:
data – Input 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.
-
Elu(const Output<Node> &data, const double alpha)#
-
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.
-
EmbeddingSegmentsSum() = default#
-
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 set to value -1 or not provided, empty “bags” are filled with zeros. Reverse indexing using negative values is not supported. 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.
reduction – enum to select algorithm used to perform reduction of elements in bag. Optional.
-
EmbeddingBagOffsets() = default#
-
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 set to value -1 or not provided, empty “bags” are filled with zeros. Reverse indexing using negative values is not supported. 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.
-
EmbeddingBagOffsetsSum() = default#
-
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_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
[batch, indices_per_bag]
and of type T_IND. Required.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.
reduction – enum to select algorithm used to perform reduction of elements in bag. Optional.
-
EmbeddingBagPacked() = default#
-
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_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
[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.
-
EmbeddingBagPackedSum() = default#
-
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
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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
inline Equal()#
-
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:
arg – Node that produces the input tensor.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Erf() = default#
-
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:
arg – Node that produces the input tensor.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Exp() = default#
-
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_rois – Input rois
input_deltas – Input deltas
input_scores – Input scores
input_im_info – Input image info
attrs – Attributes 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:
attrs – Attributes to set.
-
struct Attributes#
- #include <experimental_detectron_detection_output.hpp>
Structure that specifies attributes of the operation.
-
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)#
-
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.
-
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.
-
ExperimentalDetectronGenerateProposalsSingleImage(const Output<Node> &im_info, const Output<Node> &anchors, const Output<Node> &deltas, const Output<Node> &scores, const Attributes &attrs)#
-
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.
-
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:
attrs – Attributes to set.
-
struct Attributes#
- #include <experimental_detectron_prior_grid_generator.hpp>
Structure that specifies attributes of the operation.
-
ExperimentalDetectronPriorGridGenerator(const Output<Node> &priors, const Output<Node> &feature_map, const Output<Node> &im_data, const Attributes &attrs)#
-
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:
args – Inputs of ExperimentalDetectronROIFeatureExtractor
attrs – Operation attributes
-
ExperimentalDetectronROIFeatureExtractor(const NodeVector &args, const Attributes &attrs)#
Constructs a ExperimentalDetectronROIFeatureExtractor operation.
- Parameters:
args – Inputs of ExperimentalDetectronROIFeatureExtractor
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.
-
inline const Attributes &get_attrs() const#
Returns attributes of the operation.
-
void set_attrs(Attributes attrs)#
Set the ExperimentalDetectronROIFeatureExtractor’s attributes.
- Parameters:
attrs – Attributes to set.
-
struct Attributes#
- #include <experimental_detectron_roi_feature.hpp>
Structure that specifies attributes of the operation.
-
ExperimentalDetectronROIFeatureExtractor(const OutputVector &args, const Attributes &attrs)#
-
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_rois – Input 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.
-
ExperimentalDetectronTopKROIs(const Output<Node> &input_rois, const Output<Node> &rois_probs, size_t max_rois = 0)#
-
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.
-
ExtractImagePatches(const Output<Node> &image, const Shape &sizes, const Strides &strides, const Shape &rates, const PadType &auto_pad)#
-
class Eye : public ov::op::Op#
- #include <eye.hpp>
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:
-
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.
-
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.
-
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)#
-
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.
scale – Tensor 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.
-
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.
scale – Tensor 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.
-
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.
-
FakeConvert(const ov::Output<ov::Node> &data, const ov::Output<ov::Node> &scale, std::string destination_type = "f8e4m3")#
-
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.
-
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))#
-
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:
arg – Node that produces the input tensor.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Floor() = default#
-
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, ...]
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
inline FloorMod()#
-
class Gather : public ov::op::util::GatherBase#
- #include <gather.hpp>
Gather slices from axis of data according to indices.
-
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)#
-
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.
-
Gather(const Output<Node> &data, const Output<Node> &indices, const Output<Node> &axis, const int64_t batch_dims = 0)#
-
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
indices – Tensor 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.
-
Gather(const Output<Node> &data, const Output<Node> &indices, const Output<Node> &axis, const int64_t batch_dims = 0)#
-
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.
-
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.
-
GatherElements(const Output<Node> &data, const Output<Node> &indices, const int64_t axis)#
-
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.
-
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.
-
GatherND(const Output<Node> &data, const Output<Node> &indices, const size_t batch_dims = 0)#
-
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.
-
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.
-
GatherND(const Output<Node> &data, const Output<Node> &indices, const size_t batch_dims = 0)#
-
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_ids – Tensor of shape [MAX_TIME, BATCH_SIZE, BEAM_WIDTH] with indices from per each step
parent_idx – Tensor of shape [MAX_TIME, BATCH_SIZE, BEAM_WIDTH] with parent beam indices
max_seq_len – Tensor of shape [BATCH_SIZE] with maximum lengths for each sequence in the batch
end_token – Tensor 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.
-
GatherTree(const Output<Node> &step_ids, const Output<Node> &parent_idx, const Output<Node> &max_seq_len, const Output<Node> &end_token)#
-
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
-
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 void validate_and_infer_types() override#
-
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:
data – Input 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.
-
Gelu(const Output<Node> &data, GeluApproximationMode mode = GeluApproximationMode::ERF)#
-
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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
inline Greater()#
-
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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
inline GreaterEqual()#
-
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 a GridSample operation.
- Parameters:
data – Input data tensor (input image)
grid – Normalized interpolation coordinates
attrs – GridSample 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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
struct Attributes#
- #include <grid_sample.hpp>
A Structure which contains all GridSample attributes.
-
GridSample(const Output<Node> &data, const Output<Node> &grid, const Attributes &attributes)#
-
class GroupNormalization : public ov::op::Op#
- #include <group_normalization.hpp>
GroupNormalization operation over the input tensor.
Public Functions
-
GroupNormalization(const Output<Node> &data, const Output<Node> &scale, const Output<Node> &bias, int64_t num_groups, double epsilon)#
- Parameters:
data – The input tensor to be normalized
scale – The tensor containing scale values for each channel
bias – The tensor containing bias values for each channel
num_groups – The number of groups that the channel dimension will be divided into
epsilon – The value that prevents divisions by zero in GroupNormalization formula
-
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.
-
GroupNormalization(const Output<Node> &data, const Output<Node> &scale, const Output<Node> &bias, int64_t num_groups, double epsilon)#
-
class GRUCell : public ov::op::util::RNNCellBase#
- #include <gru_cell.hpp>
Class for GRU cell node.
Note
Note this class represents only single cell and not whole GRU layer.
Public Functions
-
GRUCell(const Output<Node> &X, const Output<Node> &initial_hidden_state, const Output<Node> &W, const Output<Node> &R, std::size_t hidden_size)#
Constructs GRUCell node.
- Parameters:
X – [in] The input tensor with shape: [batch_size, input_size].
initial_hidden_state – [in] The hidden state tensor at current time step with shape: [batch_size, hidden_size].
W – [in] The weight tensor with shape: [gates_count * hidden_size, input_size].
R – [in] The recurrence weight tensor with shape: [gates_count * hidden_size, hidden_size].
hidden_size – [in] The number of hidden units for recurrent cell.
-
GRUCell(const Output<Node> &X, const Output<Node> &initial_hidden_state, const Output<Node> &W, const Output<Node> &R, std::size_t hidden_size, const std::vector<std::string> &activations, const std::vector<float> &activations_alpha, const std::vector<float> &activations_beta, float clip, bool linear_before_reset)#
Constructs GRUCell node.
- Parameters:
X – [in] The input tensor with shape: [batch_size, input_size].
initial_hidden_state – [in] The hidden state tensor at current time step with shape: [batch_size, hidden_size].
W – [in] The weight tensor with shape: [gates_count * hidden_size, input_size].
R – [in] The recurrence weight tensor with shape: [gates_count * hidden_size, hidden_size].
hidden_size – [in] The number of hidden units for recurrent cell.
activations – [in] The vector of activation functions used inside recurrent cell.
activations_alpha – [in] The vector of alpha parameters for activation functions in order respective to activation list.
activations_beta – [in] The vector of beta parameters for activation functions in order respective to activation list.
clip – [in] The value defining clipping range [-clip, clip] on input of activation functions.
-
GRUCell(const Output<Node> &X, const Output<Node> &initial_hidden_state, const Output<Node> &W, const Output<Node> &R, const Output<Node> &B, std::size_t hidden_size, const std::vector<std::string> &activations = std::vector<std::string>{"sigmoid", "tanh"}, const std::vector<float> &activations_alpha = {}, const std::vector<float> &activations_beta = {}, float clip = 0.f, bool linear_before_reset = false)#
Constructs GRUCell node.
- Parameters:
X – [in] The input tensor with shape: [batch_size, input_size].
initial_hidden_state – [in] The hidden state tensor at current time step with shape: [batch_size, hidden_size].
W – [in] The weight tensor with shape: [gates_count * hidden_size, input_size].
R – [in] The recurrence weight tensor with shape: [gates_count * hidden_size, hidden_size].
hidden_size – [in] The number of hidden units for recurrent cell.
B – [in] The sum of biases (weight and recurrence) for update, reset and hidden gates. If linear_before_reset := true then biases for hidden gates are placed separately (weight and recurrence). Shape: [gates_count * hidden_size] if linear_before_reset := false Shape: [(gates_count + 1) * hidden_size] if linear_before_reset := true
activations – [in] The vector of activation functions used inside recurrent cell.
activations_alpha – [in] The vector of alpha parameters for activation functions in order respective to activation list.
activations_beta – [in] The vector of beta parameters for activation functions in order respective to activation list.
clip – [in] The value defining clipping range [-clip, clip] on input of activation functions.
linear_before_reset – [in] Whether or not to apply the linear transformation before multiplying by the output of the reset gate.
-
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.
-
GRUCell(const Output<Node> &X, const Output<Node> &initial_hidden_state, const Output<Node> &W, const Output<Node> &R, std::size_t hidden_size)#
-
class GRUSequence : public ov::op::util::RNNCellBase#
- #include <gru_sequence.hpp>
GRUSequence 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.
-
virtual void validate_and_infer_types() override#
-
class HardSigmoid : public ov::op::Op#
- #include <hard_sigmoid.hpp>
Parameterized, bounded sigmoid-like, piecewise linear function. min(max(alpha*x + beta, 0), 1)
Public Functions
-
HardSigmoid(const Output<Node> &data, const Output<Node> &alpha, const Output<Node> &beta)#
Constructs a HardSigmoid operation.
- Parameters:
data – Input tensor.
alpha – [in] A scalar value representing the alpha parameter.
beta – [in] A scalar value representing the beta parameter.
-
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.
-
HardSigmoid(const Output<Node> &data, const Output<Node> &alpha, const Output<Node> &beta)#
-
class HSigmoid : public ov::op::util::UnaryElementwiseArithmetic#
- #include <hsigmoid.hpp>
A HSigmoid Activation Function f(x) = min(max(x + 3, 0), 6) / 6 or f(x) = min(ReLU(x + 3), 6) / 6.
-
class HSwish : public ov::op::util::UnaryElementwiseArithmetic#
- #include <hswish.hpp>
A HSwish Activation Function f(x) = x * min(max(x + 3, 0), 6) / 6 or f(x) = x * min(ReLU(x + 3), 6) / 6.
-
class I420toBGR : public ov::op::util::ConvertColorI420Base#
- #include <i420_to_bgr.hpp>
Color conversion operation from I420 to BGR format. Input:
Input NV12 image can be represented in two ways: a) Single plane (as it is in the file): I420 height dimension is 1.5x bigger than image height. ‘C’ dimension shall be 1. b) Three separate planes (used this way in many physical video sources): Y, U and V. In this case b1) Y plane has height same as image height. ‘C’ dimension equals to 1 b2) U plane has dimensions: ‘H’ = image_h / 2; ‘W’ = image_w / 2; ‘C’ = 1. b3) V plane has dimensions: ‘H’ = image_h / 2; ‘W’ = image_w / 2; ‘C’ = 1.
Supported element types: u8 or any supported floating-point type. Output:
Output node will have NHWC layout and shape HxW same as image spatial dimensions.
Number of output channels ‘C’ will be 3, as per interleaved BGR format, first channel is B, last is R
Conversion of each pixel from I420 (YUV) to RGB space is represented by following formulas: R = 1.164 * (Y - 16) + 1.596 * (V - 128) G = 1.164 * (Y - 16) - 0.813 * (V - 128) - 0.391 * (U - 128) B = 1.164 * (Y - 16) + 2.018 * (U - 128) Then R, G, B values are clipped to range (0, 255)
Public Functions
-
explicit I420toBGR(const Output<Node> &arg)#
Constructs a conversion operation from input image in I420 format As per I420 format definition, node height dimension shall be 1.5 times bigger than image height so that image (w=640, h=480) is represented by NHWC shape {N,720,640,1} (height*1.5 x width)
-
explicit I420toBGR(const Output<Node> &arg_y, const Output<Node> &arg_u, const Output<Node> &arg_v)#
Constructs a conversion operation from 2-plane input image in NV12 format In general case Y channel of image can be separated from UV channel which means that operation needs two nodes for Y and UV planes respectively. Y plane has one channel, and UV has 2 channels, both expect ‘NHWC’ layout.
- Parameters:
arg_y – Node that produces the input tensor for Y plane (NHWC layout). Shall have WxH dimensions equal to image dimensions. ‘C’ dimension equals to 1.
arg_u – Node that produces the input tensor for U plane (NHWC layout). ‘H’ is half of image height, ‘W’ is half of image width, ‘C’ dimension equals to 1.
arg_v – Node that produces the input tensor for V plane (NHWC layout). ‘H’ is half of image height, ‘W’ is half of image width, ‘C’ dimension equals to 1.
-
class I420toRGB : public ov::op::util::ConvertColorI420Base#
- #include <i420_to_rgb.hpp>
Color conversion operation from I420 to RGB format. Input:
Input NV12 image can be represented in two ways: a) Single plane (as it is in the file): I420 height dimension is 1.5x bigger than image height. ‘C’ dimension shall be 1. b) Three separate planes (used this way in many physical video sources): Y, U and V. In this case b1) Y plane has height same as image height. ‘C’ dimension equals to 1 b2) U plane has dimensions: ‘H’ = image_h / 2; ‘W’ = image_w / 2; ‘C’ = 1. b3) V plane has dimensions: ‘H’ = image_h / 2; ‘W’ = image_w / 2; ‘C’ = 1.
Supported element types: u8 or any supported floating-point type. Output:
Output node will have NHWC layout and shape HxW same as image spatial dimensions.
Number of output channels ‘C’ will be 3, as per interleaved RGB format, first channel is R, last is B
Conversion of each pixel from I420 (YUV) to RGB space is represented by following formulas: R = 1.164 * (Y - 16) + 1.596 * (V - 128) G = 1.164 * (Y - 16) - 0.813 * (V - 128) - 0.391 * (U - 128) B = 1.164 * (Y - 16) + 2.018 * (U - 128) Then R, G, B values are clipped to range (0, 255)
Public Functions
-
explicit I420toRGB(const Output<Node> &arg)#
Constructs a conversion operation from input image in I420 format As per I420 format definition, node height dimension shall be 1.5 times bigger than image height so that image (w=640, h=480) is represented by NHWC shape {N,720,640,1} (height*1.5 x width)
-
explicit I420toRGB(const Output<Node> &arg_y, const Output<Node> &arg_u, const Output<Node> &arg_v)#
Constructs a conversion operation from 2-plane input image in NV12 format In general case Y channel of image can be separated from UV channel which means that operation needs two nodes for Y and UV planes respectively. Y plane has one channel, and UV has 2 channels, both expect ‘NHWC’ layout.
- Parameters:
arg_y – Node that produces the input tensor for Y plane (NHWC layout). Shall have WxH dimensions equal to image dimensions. ‘C’ dimension equals to 1.
arg_u – Node that produces the input tensor for U plane (NHWC layout). ‘H’ is half of image height, ‘W’ is half of image width, ‘C’ dimension equals to 1.
arg_v – Node that produces the input tensor for V plane (NHWC layout). ‘H’ is half of image height, ‘W’ is half of image width, ‘C’ dimension equals to 1.
-
class IDFT : public ov::op::util::FFTBase#
- #include <idft.hpp>
An operation IDFT that computes the inverse discrete Fourier transformation.
-
class If : public ov::op::util::MultiSubGraphOp#
- #include <if.hpp>
If operation.
Public Functions
-
If(const Output<Node> &execution_condition)#
Constructs If with condition.
- Parameters:
execution_condition – condition node.
-
inline const std::shared_ptr<Model> &get_then_body() const#
gets then_body as ov::Model.
- Returns:
then_body as ov::Model.
-
inline const std::shared_ptr<Model> &get_else_body() const#
gets else_body as ov::Model.
- Returns:
else_body as ov::Model.
sets new ov::Model as new then_body.
- Parameters:
body – new body for ‘then’ branch.
sets new ov::Model as new else_body.
- Parameters:
body – new body for ‘else’ branch.
sets new input to the operation associated with parameters of each sub-graphs
- Parameters:
value – input to operation
then_parameter – parameter for then_body or nullptr
else_parameter – parameter for else_body or nullpt
sets new output from the operation associated with results of each sub-graphs
- Parameters:
then_result – result from then_body
else_parameter – result from else_body
- Returns:
output from 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.
-
If(const Output<Node> &execution_condition)#
-
class Interpolate : public ov::op::Op#
- #include <interpolate.hpp>
Layer which performs bilinear interpolation.
Public Functions
-
Interpolate(const Output<Node> &image, const Output<Node> &output_shape, const Attributes &attrs)#
Constructs a Interpolate 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.
-
struct Attributes#
- #include <interpolate.hpp>
Structure that specifies attributes for interpolation.
-
Interpolate(const Output<Node> &image, const Output<Node> &output_shape, const Attributes &attrs)#
-
class Interpolate : public ov::op::util::InterpolateBase#
- #include <interpolate.hpp>
Interpolate operation.
Public Functions
-
Interpolate(const Output<Node> &image, const Output<Node> &output_shape, const Output<Node> &scales, const InterpolateAttrs &attrs)#
Constructs a Interpolate operation without ‘axes’ input.
-
Interpolate(const Output<Node> &image, const Output<Node> &output_shape, const Output<Node> &scales, const Output<Node> &axes, const InterpolateAttrs &attrs)#
Constructs a Interpolate operation with ‘axes’ 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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Interpolate(const Output<Node> &image, const Output<Node> &output_shape, const Output<Node> &scales, const InterpolateAttrs &attrs)#
-
class Interpolate : public ov::op::util::InterpolateBase#
- #include <interpolate.hpp>
Interpolate operation.
Public Functions
-
Interpolate(const Output<Node> &image, const Output<Node> &scales_or_sizes, const InterpolateAttrs &attrs)#
Constructs a Interpolate operation without ‘axes’ input.
- Parameters:
image – Input image
scales_or_sizes – Scales of spatial axes, i.e. output_shape / input_shape
attrs – Interpolation attributes
-
Interpolate(const Output<Node> &image, const Output<Node> &scales_or_sizes, const Output<Node> &axes, const InterpolateAttrs &attrs)#
Constructs a Interpolate operation with ‘axes’ input.
- Parameters:
image – Input image
scales_or_sizes – Scales of spatial axes, i.e. output_shape / input_shape
axes – Interpolation axes
attrs – Interpolation 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 virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Interpolate(const Output<Node> &image, const Output<Node> &scales_or_sizes, const InterpolateAttrs &attrs)#
-
class Inverse : public ov::op::Op#
- #include <inverse.hpp>
Inverse operation computes the inverse of the input tensor.
Public Functions
-
Inverse(const Output<Node> &data, const bool adjoint = false)#
Inverse operation computes the inverse of the input matrices. The inverse is computed for each MxM matrix separetely, preserving all batch dimensions.
- Parameters:
data – Input matrices to compute the inverse for. Last two tensor dimensions must be of the same size.
adjoint – Boolean that determines whether to return a normal inverse or adjoint (conjugate transpose) of the input matrices.
-
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.
-
Inverse(const Output<Node> &data, const bool adjoint = false)#
-
class IsFinite : public ov::op::Op#
- #include <is_finite.hpp>
Boolean mask that maps NaN and Infinity values to false and other values to true.
Public Functions
-
IsFinite(const Output<Node> &data)#
Constructs a IsFinite operation.
- Parameters:
data – Input data 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.
-
IsFinite(const Output<Node> &data)#
-
class IsInf : public ov::op::Op#
- #include <is_inf.hpp>
Boolean mask that maps infinite values to true.
Public Functions
-
IsInf(const Output<Node> &data, const Attributes &attributes)#
Constructs a IsInf 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.
-
IsInf(const Output<Node> &data, const Attributes &attributes)#
-
class IsNaN : public ov::op::Op#
- #include <is_nan.hpp>
Boolean mask that maps NaN values to true and other values to false.
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.
-
virtual void validate_and_infer_types() override#
-
class Less : public ov::op::util::BinaryElementwiseComparison#
- #include <less.hpp>
Elementwise less-than operation.
Public Functions
-
inline Less()#
Constructs a less-than operation.
-
Less(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs a less-than operation.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
inline Less()#
-
class LessEqual : public ov::op::util::BinaryElementwiseComparison#
- #include <less_eq.hpp>
Elementwise less-than-or-equal operation.
Public Functions
-
inline LessEqual()#
Constructs a less-than-or-equal operation.
-
LessEqual(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs a less-than-or-equal operation.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
inline LessEqual()#
-
class Log : public ov::op::util::UnaryElementwiseArithmetic#
- #include <log.hpp>
Elementwise natural log operation.
Public Functions
-
Log() = default#
Constructs a natural log operation.
-
Log(const Output<Node> &arg)#
Constructs a natural log operation.
- Parameters:
arg – Node that produces the input tensor.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Log() = default#
-
class LogSoftmax : public ov::op::Op#
- #include <log_softmax.hpp>
LogSoftmax operation.
Public Functions
-
LogSoftmax(const Output<Node> &arg, const int64_t axis)#
Constructs a LogSoftmax operation.
Output
[d0, ...]
- Parameters:
arg – Node that produces the first input tensor.
[d0, ...]
axis – The axis position (0-based) on which to calculate the LogSoftmax.
-
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.
-
LogSoftmax(const Output<Node> &arg, const int64_t axis)#
-
class LogicalAnd : public ov::op::util::BinaryElementwiseLogical#
- #include <logical_and.hpp>
Elementwise logical-and operation.
Public Functions
-
LogicalAnd() = default#
Constructs a logical-and operation.
-
LogicalAnd(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs a logical-and operation.
Output
[d0, ...]
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
LogicalAnd() = default#
-
class LogicalNot : public ov::op::Op#
- #include <logical_not.hpp>
Elementwise logical negation operation.
Public Functions
-
LogicalNot() = default#
Constructs a logical negation operation.
-
LogicalNot(const Output<Node> &arg)#
Constructs a logical negation operation.
- Parameters:
arg – Node 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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
LogicalNot() = default#
-
class LogicalOr : public ov::op::util::BinaryElementwiseLogical#
- #include <logical_or.hpp>
Elementwise logical-or operation.
Public Functions
-
LogicalOr(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs a logical-or operation.
Output
[d0, ...]
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
LogicalOr(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
-
class LogicalXor : public ov::op::util::BinaryElementwiseLogical#
- #include <logical_xor.hpp>
Elementwise logical-xor operation.
Public Functions
-
LogicalXor(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs a logical-xor operation.
Output
[d0, ...]
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
LogicalXor(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
-
class Loop : public ov::op::util::SubGraphOp#
- #include <loop.hpp>
Iterate a body over tensors, accumulating into tensors.
Public Functions
-
Loop(const Output<Node> &trip_count, const Output<Node> &execution_condition)#
Constructs a Loop operation.
-
virtual Output<Node> get_concatenated_slices(const Output<Node> &value, int64_t start, int64_t stride, int64_t part_size, int64_t end, int64_t axis) override#
Concatenates slices from all iterations.
- Parameters:
value – The value supplying slice values from each iteration.
start – First index on axis of the slicing
stride – Stepping of the slice
part_size – Size of the slice on axis
end – The last index on axis of the slicing
axis – The axis to slice along
- Returns:
The concatenated slices.
-
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.
-
struct SpecialBodyPorts#
- #include <loop.hpp>
Allows to define the purpose of inputs/outputs in the body.
-
Loop(const Output<Node> &trip_count, const Output<Node> &execution_condition)#
-
class LRN : public ov::op::Op#
- #include <lrn.hpp>
Elementwise Local Response Normalization (LRN) operation.
Inputs
Type
Description
arg
\(N[n, c, d_1,\dots,d_n]~(n \geq 0)\)
A tensor of any shape and numeric element type.
Type
Description
\(N[n, c, d_1,\dots,d_n]\)
The tensor \(T\), where \(T[n, c, d_1,\dots,d_n] = \frac{N[n,i,d_1,\dots,d_n]}{ (bias + alpha * (\sum_{i=max(0,(nsize-1)/2)}^{min(C, (nsize-1)/2)+1} N[n,i,d_1,\dots,d_n]^{2}) ^ {2})}\)
Public Functions
-
LRN(const Output<Node> &arg, double alpha, double beta, double bias, size_t size)#
Constructs a LRN operation.
- Parameters:
arg – Node 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.
-
LRN(const Output<Node> &arg, double alpha, double beta, double bias, size_t size)#
-
class LSTMCell : public ov::op::util::RNNCellBase#
- #include <lstm_cell.hpp>
Class for single lstm cell node.
See also
LSTMSequence, RNNCell, GRUCell
Note
Following implementation supports:
peepholes
Gers & Schmidhuber (2000) https://ieeexplore.ieee.org/document/861302Coupling input and forget gates.
Note
It calculates following equations:
it = f(Xt*(Wi^T) + Ht-1*(Ri^T) + Pi (.) Ct-1 + Wbi + Rbi) ft = f(Xt*(Wf^T) + Ht-1*(Rf^T) + Pf (.) Ct-1 + Wbf + Rbf) ct = g(Xt*(Wc^T) + Ht-1*(Rc^T) + Wbc + Rbc) Ct = ft (.) Ct-1 + it (.) ct ot = f(Xt*(Wo^T) + Ht-1*(Ro^T) + Po (.) Ct + Wbo + Rbo) Ht = ot (.) h(Ct) * - Is a dot product, (.) - is a Hadamard product (element-wise), f, g, h - are activation functions.
Note
This class represents only single cell (for current time step) and not the whole LSTM Sequence layer
Public Functions
-
LSTMCell(const Output<Node> &X, const Output<Node> &initial_hidden_state, const Output<Node> &initial_cell_state, const Output<Node> &W, const Output<Node> &R, std::size_t hidden_size, LSTMWeightsFormat weights_format = LSTMWeightsFormat::IFCO, const std::vector<std::string> &activations = std::vector<std::string>{"sigmoid", "tanh", "tanh"}, const std::vector<float> &activations_alpha = {}, const std::vector<float> &activations_beta = {}, float clip = 0.f, bool input_forget = false)#
Constructs LSTMCell node.
- Parameters:
X – [in] The input tensor with shape: [batch_size, input_size].
initial_hidden_state – [in] The hidden state tensor at current time step with shape: [batch_size, hidden_size].
initial_cell_state – [in] The cell state tensor at current time step with shape: [batch_size, hidden_size].
W – [in] The gate weights tensor with shape: [4*hidden_size, input_size].
R – [in] The recurrence weights tensor with shape: [4*hidden_size, hidden_size].
hidden_size – [in] The number of hidden units for recurrent cell.
weights_format – [in] The order of gates in weights tensors. The default format is IFCO since it is used by DNNL.
activations – [in] The vector of activation functions used inside recurrent cell.
activations_alpha – [in] The vector of alpha parameters for activation functions in order respective to activation list.
activations_beta – [in] The vector of beta parameters for activation functions in order respective to activation list.
clip – [in] The value defining clipping range [-clip, clip] on input of activation functions.
input_forget – [in] Controls coupling input and forget gates.
-
LSTMCell(const Output<Node> &X, const Output<Node> &initial_hidden_state, const Output<Node> &initial_cell_state, const Output<Node> &W, const Output<Node> &R, const Output<Node> &B, std::size_t hidden_size, LSTMWeightsFormat weights_format = LSTMWeightsFormat::IFCO, const std::vector<std::string> &activations = std::vector<std::string>{"sigmoid", "tanh", "tanh"}, const std::vector<float> &activations_alpha = {}, const std::vector<float> &activations_beta = {}, float clip = 0.f, bool input_forget = false)#
Constructs LSTMCell node.
- Parameters:
X – [in] The input tensor with shape: [batch_size, input_size].
initial_hidden_state – [in] The hidden state tensor at current time step with shape: [batch_size, hidden_size].
initial_cell_state – [in] The cell state tensor at current time step with shape: [batch_size, hidden_size].
W – [in] The weight tensor with shape: [4*hidden_size, input_size].
R – [in] The recurrence weight tensor with shape: [4*hidden_size, hidden_size].
B – [in] The bias tensor for gates with shape: [4*hidden_size].
hidden_size – [in] The number of hidden units for recurrent cell.
weights_format – [in] The order of gates in weights tensors. The default format is IFCO since it is used by DNNL.
activations – [in] The vector of activation functions used inside recurrent cell.
activations_alpha – [in] The vector of alpha parameters for activation functions in order respective to activation list.
activations_beta – [in] The vector of beta parameters for activation functions in order respective to activation list.
clip – [in] The value defining clipping range [-clip, clip] on input of activation functions.
input_forget – [in] Controls coupling input and forget gates.
-
LSTMCell(const Output<Node> &X, const Output<Node> &initial_hidden_state, const Output<Node> &initial_cell_state, const Output<Node> &W, const Output<Node> &R, const Output<Node> &B, const Output<Node> &P, std::size_t hidden_size, LSTMWeightsFormat weights_format = LSTMWeightsFormat::IFCO, const std::vector<std::string> &activations = std::vector<std::string>{"sigmoid", "tanh", "tanh"}, const std::vector<float> &activations_alpha = {}, const std::vector<float> &activations_beta = {}, float clip = 0.f, bool input_forget = false)#
Constructs LSTMCell node.
- Parameters:
X – [in] The input tensor with shape: [batch_size, input_size].
initial_hidden_state – [in] The hidden state tensor at current time step with shape: [batch_size, hidden_size].
initial_cell_state – [in] The cell state tensor at current time step with shape: [batch_size, hidden_size].
W – [in] The weight tensor with shape: [4*hidden_size, input_size].
R – [in] The recurrence weight tensor with shape: [4*hidden_size, hidden_size].
B – [in] The bias tensor for gates with shape: [4*hidden_size].
P – [in] The weight tensor for peepholes with shape: [3*hidden_size] - 3 equals to only iof gates. The order is: input, output, forget gates.
hidden_size – [in] The number of hidden units for recurrent cell.
weights_format – [in] The order of gates in weights tensors. The default format is IFCO since it is used by DNNL.
activations – [in] The vector of activation functions used inside recurrent cell.
activations_alpha – [in] The vector of alpha parameters for activation functions in order respective to activation list.
activations_beta – [in] The vector of beta parameters for activation functions in order respective to activation list.
clip – [in] The value defining clipping range [-clip, clip] on input of activation functions.
input_forget – [in] Controls coupling input and forget gates.
-
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 LSTMCell : public ov::op::util::RNNCellBase#
- #include <lstm_cell.hpp>
Class for single lstm cell node.
See also
LSTMSequence, RNNCell, GRUCell
Note
Following implementation supports:
peepholes
Gers & Schmidhuber (2000) https://ieeexplore.ieee.org/document/861302Coupling input and forget gates.
Note
It calculates following equations:
it = f(Xt*(Wi^T) + Ht-1*(Ri^T) + Wbi + Rbi) ft = f(Xt*(Wf^T) + Ht-1*(Rf^T) + Wbf + Rbf) ct = g(Xt*(Wc^T) + Ht-1*(Rc^T) + Wbc + Rbc) Ct = ft (.) Ct-1 + it (.) ct ot = f(Xt*(Wo^T) + Ht-1*(Ro^T) + Wbo + Rbo) Ht = ot (.) h(Ct) * - Is a dot product, (.) - is a Hadamard product (element-wise), f, g, h - are activation functions.
Note
This class represents only single cell (for current time step) and not the whole LSTM Sequence layer
Public Functions
-
LSTMCell(const Output<Node> &X, const Output<Node> &initial_hidden_state, const Output<Node> &initial_cell_state, const Output<Node> &W, const Output<Node> &R, std::size_t hidden_size, const std::vector<std::string> &activations = std::vector<std::string>{"sigmoid", "tanh", "tanh"}, const std::vector<float> &activations_alpha = {}, const std::vector<float> &activations_beta = {}, float clip = 0.f)#
Constructs LSTMCell node.
- Parameters:
X – [in] The input tensor with shape: [batch_size, input_size].
initial_hidden_state – [in] The hidden state tensor at current time step with shape: [batch_size, hidden_size].
initial_cell_state – [in] The cell state tensor at current time step with shape: [batch_size, hidden_size].
W – [in] The gate weights tensor with shape: [4*hidden_size, input_size].
R – [in] The recurrence weights tensor with shape: [4*hidden_size, hidden_size].
hidden_size – [in] The number of hidden units for recurrent cell.
activations – [in] The vector of activation functions used inside recurrent cell.
activations_alpha – [in] The vector of alpha parameters for activation functions in order respective to activation list.
activations_beta – [in] The vector of beta parameters for activation functions in order respective to activation list.
clip – [in] The value defining clipping range [-clip, clip] on input of activation functions.
-
LSTMCell(const Output<Node> &X, const Output<Node> &initial_hidden_state, const Output<Node> &initial_cell_state, const Output<Node> &W, const Output<Node> &R, const Output<Node> &B, std::size_t hidden_size, const std::vector<std::string> &activations = std::vector<std::string>{"sigmoid", "tanh", "tanh"}, const std::vector<float> &activations_alpha = {}, const std::vector<float> &activations_beta = {}, float clip = 0.f)#
Constructs LSTMCell node.
- Parameters:
X – [in] The input tensor with shape: [batch_size, input_size].
initial_hidden_state – [in] The hidden state tensor at current time step with shape: [batch_size, hidden_size].
initial_cell_state – [in] The cell state tensor at current time step with shape: [batch_size, hidden_size].
W – [in] The weight tensor with shape: [4*hidden_size, input_size].
R – [in] The recurrence weight tensor with shape: [4*hidden_size, hidden_size].
B – [in] The bias tensor for gates with shape: [4*hidden_size].
hidden_size – [in] The number of hidden units for recurrent cell.
activations – [in] The vector of activation functions used inside recurrent cell.
activations_alpha – [in] The vector of alpha parameters for activation functions in order respective to activation list.
activations_beta – [in] The vector of beta parameters for activation functions in order respective to activation list.
clip – [in] The value defining clipping range [-clip, clip] on input of activation 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 LSTMSequence : public ov::op::util::RNNCellBase#
- #include <lstm_sequence.hpp>
Class for lstm sequence node.
Note
It follows notation and equations defined as in ONNX standard: onnx/onnx
Public Functions
-
inline virtual size_t get_default_output_index() const override#
Returns the output of the default output, or throws if there is none.
-
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 size_t get_default_output_index() const override#
-
class LSTMSequence : public ov::op::util::RNNCellBase#
- #include <lstm_sequence.hpp>
Class for lstm sequence node.
See also
LSTMCell, RNNCell, GRUCell
Note
It follows notation and equations defined as in ONNX standard: onnx/onnx
Public Functions
-
inline virtual size_t get_default_output_index() const override#
Returns the output of the default output, or throws if there is none.
-
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 size_t get_default_output_index() const override#
-
class MatMul : public ov::op::Op#
- #include <matmul.hpp>
Operator performing Matrix Multiplication.
Public Functions
-
MatMul(const Output<Node> &A, const Output<Node> &B, const bool &transpose_a = false, const bool &transpose_b = false)#
Constructs an Matrix Multiplication operation.
- Parameters:
A – Matrix A
B – Matrix B
transpose_a – If matrix A should be transposed.
transpose_b – If matrix B should be transposed.
-
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.
-
MatMul(const Output<Node> &A, const Output<Node> &B, const bool &transpose_a = false, const bool &transpose_b = false)#
-
class MatrixNms : public ov::op::Op#
- #include <matrix_nms.hpp>
MatrixNms operation.
Public Functions
-
MatrixNms() = default#
Constructs a conversion operation.
-
MatrixNms(const Output<Node> &boxes, const Output<Node> &scores, const Attributes &attrs)#
Constructs a MatrixNms operation.
- Parameters:
boxes – Node producing the box coordinates
scores – Node producing the box scores
attrs – Attributes of the 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.
-
inline const Attributes &get_attrs() const#
Returns attributes of the operation MatrixNms.
-
struct Attributes#
- #include <matrix_nms.hpp>
Structure that specifies attributes of the operation.
-
MatrixNms() = default#
-
class MaxPool : public ov::op::util::MaxPoolBase#
- #include <max_pool.hpp>
Batched max pooling operation.
Public Functions
-
MaxPool() = default#
Constructs a batched max pooling operation.
-
MaxPool(const Output<Node> &arg, const Strides &strides, const Shape &pads_begin, const Shape &pads_end, const Shape &kernel, const op::RoundingType rounding_type = op::RoundingType::FLOOR, const PadType auto_pad = op::PadType::EXPLICIT)#
Constructs a batched max pooling operation.
- Parameters:
arg – The node producing the input data batch tensor.
strides – The strides.
pads_begin – The beginning of padding shape.
pads_end – The end of padding shape.
kernel – The kernel shape.
rounding_type – Whether to use ceiling or floor rounding type while computing output shape.
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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
MaxPool() = default#
-
class MaxPool : public ov::op::util::MaxPoolBase#
- #include <max_pool.hpp>
MaxPooling operation with values and indices calculated as individual outputs.
Public Functions
-
MaxPool(const Output<Node> &arg, const Strides &strides, const Strides &dilations, const Shape &pads_begin, const Shape &pads_end, const Shape &kernel, const op::RoundingType rounding_type = op::RoundingType::FLOOR, const PadType auto_pad = op::PadType::EXPLICIT, const element::Type index_element_type = element::i64, const int64_t axis = 0)#
Constructs a parametrized MaxPool operation.
- Parameters:
arg – Output of a node producing the feature tensor to be pooled.
strides – The strides of the pooling filter.
dilations – The dilations of the pooling filter.
pads_begin – Paddings at the beginning of each spatial axis.
pads_end – Paddings at the end of each spatial axis.
kernel – The kernel shape.
rounding_type – Whether to use ceiling or floor rounding type while computing the output shape.
auto_pad – The pad type for automatic calculation of the padding sizes.
index_element_type – The data type used by the second output tensor containing the selected indices.
axis – Indicates a dimension in the input data shape which should be used as a starting point for calculation of the upper bound of allowed values of the 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.
-
element::Type get_index_element_type() const noexcept#
- Returns:
The data type of the second output tensor (indices).
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
MaxPool(const Output<Node> &arg, const Strides &strides, const Strides &dilations, const Shape &pads_begin, const Shape &pads_end, const Shape &kernel, const op::RoundingType rounding_type = op::RoundingType::FLOOR, const PadType auto_pad = op::PadType::EXPLICIT, const element::Type index_element_type = element::i64, const int64_t axis = 0)#
-
class MaxPool : public ov::op::util::MaxPoolBase#
- #include <max_pool.hpp>
MaxPooling operation with values and indices calculated as individual outputs.
Public Functions
-
MaxPool(const Output<Node> &arg, const Strides &strides, const Strides &dilations, const Shape &pads_begin, const Shape &pads_end, const Shape &kernel, const op::RoundingType rounding_type = op::RoundingType::FLOOR, const PadType auto_pad = op::PadType::EXPLICIT, const element::Type index_element_type = element::i64, const int64_t axis = 0)#
Constructs a parametrized MaxPool operation.
- Parameters:
arg – Output of a node producing the feature tensor to be pooled.
strides – The strides of the pooling filter.
dilations – The dilations of the pooling filter.
pads_begin – Paddings at the beginning of each spatial axis.
pads_end – Paddings at the end of each spatial axis.
kernel – The kernel shape.
rounding_type – Whether to use ceiling or floor rounding type while computing the output shape.
auto_pad – The pad type for automatic calculation of the padding sizes.
index_element_type – The data type used by the second output tensor containing the selected indices.
axis – Indicates a dimension in the input data shape which should be used as a starting point for calculation of the upper bound of allowed values of the 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.
-
element::Type get_index_element_type() const noexcept#
- Returns:
The data type of the second output tensor (indices).
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
MaxPool(const Output<Node> &arg, const Strides &strides, const Strides &dilations, const Shape &pads_begin, const Shape &pads_end, const Shape &kernel, const op::RoundingType rounding_type = op::RoundingType::FLOOR, const PadType auto_pad = op::PadType::EXPLICIT, const element::Type index_element_type = element::i64, const int64_t axis = 0)#
-
class Maximum : public ov::op::util::BinaryElementwiseArithmetic#
- #include <maximum.hpp>
Elementwise maximum operation.
Public Functions
-
inline Maximum()#
Constructs a maximum operation.
-
Maximum(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs a maximum operation.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
inline Maximum()#
-
class Minimum : public ov::op::util::BinaryElementwiseArithmetic#
- #include <minimum.hpp>
Elementwise minimum operation.
Public Functions
-
inline Minimum()#
Constructs a minimum operation.
-
Minimum(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs a minimum operation.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
inline Minimum()#
-
class Mish : public ov::op::util::UnaryElementwiseArithmetic#
- #include <mish.hpp>
A Self Regularized Non-Monotonic Neural Activation Function f(x) = x * tanh(log(exp(x) + 1.))
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.
-
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#
-
class Mod : public ov::op::util::BinaryElementwiseArithmetic#
- #include <mod.hpp>
Mod returns an element-wise division reminder with two given tensors applying multi-directional broadcast rules.
Public Functions
-
Mod(const Output<Node> &A, const Output<Node> &B, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
- Parameters:
A – - Dividend tensor
B – - Divisor tensor
auto_broadcast – Auto broadcast specification
-
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.
-
Mod(const Output<Node> &A, const Output<Node> &B, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
-
class Multinomial : public ov::op::Op#
- #include <multinomial.hpp>
Multinomial operation creates a sequence of indices of classes sampled from the multinomial distribution.
Public Functions
-
Multinomial(const Output<Node> &input, const Output<Node> &num_samples, const ov::element::Type_t convert_type, const bool with_replacement, const bool log_probs, const uint64_t global_seed = 0, const uint64_t op_seed = 0)#
Multinomial operation creates a sequence of indices of classes sampled from the multinomial distribution.
- Parameters:
probs – Input tensor containing at each index poisition probability/log probability of sampling a given class. Any floating-point precision values are allowed.
num_samples – Scalar or 1D tensor with a single value that determines the number of samples to generate per batch. Values should be of an integer type.
convert_type – Data type to which to convert the output class indices. Allowed values: i32/i64
with_replacement – Boolean that determines whether a sampled class can appear more than once in the output.
log_probs – Boolean that determines whether to treat input probabilities as log probabilities.
global_seed – First seed value (key) of Philox random number generation algorithm. (See RandomUniform for details)
op_seed – Second seed value (counter) of Philox random number generation algorithm. (See RandomUniform for details)
-
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.
-
Multinomial(const Output<Node> &input, const Output<Node> &num_samples, const ov::element::Type_t convert_type, const bool with_replacement, const bool log_probs, const uint64_t global_seed = 0, const uint64_t op_seed = 0)#
-
class Multiply : public ov::op::util::BinaryElementwiseArithmetic#
- #include <multiply.hpp>
Elementwise multiplication operation.
Public Functions
-
inline Multiply()#
Constructs a multiplication operation.
-
Multiply(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs a multiplication operation.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
inline Multiply()#
-
class MVN : public ov::op::Op#
- #include <mvn.hpp>
Operator performing Mean Variance Normalization.
Public Functions
-
MVN(const Output<Node> &data, bool across_channels = true, bool normalize_variance = true, double eps = 1e-9)#
Constructs an MVN operation.
- Parameters:
data – Input tensor with data
normalize_variance – flag that denotes whether to perform variance normalization.
across_channels – flag that denotes if mean values are shared across channels.
eps – the number to be added to the variance to avoid division by zero when normalizing the value
-
MVN(const Output<Node> &data, AxisSet reduction_axes, bool normalize_variance = true, double eps = 1e-9)#
Constructs an MVN operation.
- Parameters:
data – Input tensor with data
reduction_axes – A list of axes, along which to reduce.
normalize_variance – flag that denotes whether to perform variance normalization.
eps – the number to be added to the variance to avoid division by zero when normalizing the value
-
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.
-
MVN(const Output<Node> &data, bool across_channels = true, bool normalize_variance = true, double eps = 1e-9)#
-
class MVN : public ov::op::Op#
- #include <mvn.hpp>
Operator performing Mean Variance Normalization.
Public Functions
-
MVN(const Output<Node> &data, const Output<Node> &reduction_axes, bool normalize_variance, float eps, MVNEpsMode eps_mode)#
Constructs an MVN operation.
- Parameters:
data – Input tensor with data
reduction_axes – A list of axes, along which to reduce.
normalize_variance – flag that denotes whether to perform variance normalization.
eps – the number to be added to the variance to avoid division by zero when normalizing the value
eps_mode – the mode of applying epsilon
-
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 &output_values, const ov::TensorVector &input_values) 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.
-
MVN(const Output<Node> &data, const Output<Node> &reduction_axes, bool normalize_variance, float eps, MVNEpsMode eps_mode)#
-
class Negative : public ov::op::util::UnaryElementwiseArithmetic#
- #include <negative.hpp>
Elementwise negative operation.
Public Functions
-
Negative() = default#
Constructs a negative operation.
-
Negative(const Output<Node> &arg)#
Constructs a negative operation.
- Parameters:
arg – Node that produces the input tensor.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Negative() = default#
-
class NonMaxSuppression : public ov::op::Op#
- #include <non_max_suppression.hpp>
Elementwise addition operation.
Public Functions
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const Output<Node> &max_output_boxes_per_class, const Output<Node> &iou_threshold, const Output<Node> &score_threshold, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true)#
Constructs a NonMaxSuppression operation.
- Parameters:
boxes – Node producing the box coordinates
scores – Node producing the box scores
max_output_boxes_per_class – Node producing maximum number of boxes to be selected per class
iou_threshold – Node producing intersection over union threshold
score_threshold – Node producing minimum score threshold
box_encoding – Specifies the format of boxes data encoding
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true)#
Constructs a NonMaxSuppression operation with default values for the last 3 inputs.
- 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.
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const Output<Node> &max_output_boxes_per_class, const Output<Node> &iou_threshold, const Output<Node> &score_threshold, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true)#
-
class NonMaxSuppression : public ov::op::Op#
- #include <non_max_suppression.hpp>
NonMaxSuppression operation.
Subclassed by ov::op::v4::NonMaxSuppression
Public Functions
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const Output<Node> &max_output_boxes_per_class, const Output<Node> &iou_threshold, const Output<Node> &score_threshold, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true, const ov::element::Type &output_type = ov::element::i64)#
Constructs a NonMaxSuppression operation.
- Parameters:
boxes – Node producing the box coordinates
scores – Node producing the box scores
max_output_boxes_per_class – Node producing maximum number of boxes to be selected per class
iou_threshold – Node producing intersection over union threshold
score_threshold – Node producing minimum score threshold
box_encoding – Specifies the format of boxes data encoding
sort_result_descending – Specifies whether it is necessary to sort selected boxes across batches
output_type – Specifies the output tensor type
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true, const ov::element::Type &output_type = ov::element::i64)#
Constructs a NonMaxSuppression operation with default values for the last 3 inputs.
- 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.
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const Output<Node> &max_output_boxes_per_class, const Output<Node> &iou_threshold, const Output<Node> &score_threshold, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true, const ov::element::Type &output_type = ov::element::i64)#
-
class NonMaxSuppression : public ov::op::v3::NonMaxSuppression#
- #include <non_max_suppression.hpp>
NonMaxSuppression operation.
Public Functions
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const Output<Node> &max_output_boxes_per_class, const Output<Node> &iou_threshold, const Output<Node> &score_threshold, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true, const ov::element::Type &output_type = ov::element::i64)#
Constructs a NonMaxSuppression operation.
- Parameters:
boxes – Node producing the box coordinates
scores – Node producing the box scores
max_output_boxes_per_class – Node producing maximum number of boxes to be selected per class
iou_threshold – Node producing intersection over union threshold
score_threshold – Node producing minimum score threshold
box_encoding – Specifies the format of boxes data encoding
sort_result_descending – Specifies whether it is necessary to sort selected boxes across batches
output_type – Specifies the output tensor type
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true, const ov::element::Type &output_type = ov::element::i64)#
Constructs a NonMaxSuppression operation with default values for the last 3 inputs.
- 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.
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const Output<Node> &max_output_boxes_per_class, const Output<Node> &iou_threshold, const Output<Node> &score_threshold, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true, const ov::element::Type &output_type = ov::element::i64)#
-
class NonMaxSuppression : public ov::op::Op#
- #include <non_max_suppression.hpp>
NonMaxSuppression operation.
Public Functions
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true, const ov::element::Type &output_type = ov::element::i64)#
Constructs a NonMaxSuppression operation with default values in the last 4 inputs.
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const Output<Node> &max_output_boxes_per_class, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true, const ov::element::Type &output_type = ov::element::i64)#
Constructs a NonMaxSuppression operation with default values in the last. 3 inputs.
- Parameters:
boxes – Node producing the box coordinates
scores – Node producing the box scores
max_output_boxes_per_class – Node producing maximum number of boxes to be selected per class
box_encoding – Specifies the format of boxes data encoding
sort_result_descending – Specifies whether it is necessary to sort selected boxes across batches
output_type – Specifies the output tensor type
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const Output<Node> &max_output_boxes_per_class, const Output<Node> &iou_threshold, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true, const ov::element::Type &output_type = ov::element::i64)#
Constructs a NonMaxSuppression operation with default values in the last. 2 inputs.
- Parameters:
boxes – Node producing the box coordinates
scores – Node producing the box scores
max_output_boxes_per_class – Node producing maximum number of boxes to be selected per class
iou_threshold – Node producing intersection over union threshold
box_encoding – Specifies the format of boxes data encoding
sort_result_descending – Specifies whether it is necessary to sort selected boxes across batches
output_type – Specifies the output tensor type
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const Output<Node> &max_output_boxes_per_class, const Output<Node> &iou_threshold, const Output<Node> &score_threshold, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true, const ov::element::Type &output_type = ov::element::i64)#
Constructs a NonMaxSuppression operation with default value in the last. input.
- Parameters:
boxes – Node producing the box coordinates
scores – Node producing the box scores
max_output_boxes_per_class – Node producing maximum number of boxes to be selected per class
iou_threshold – Node producing intersection over union threshold
score_threshold – Node producing minimum score threshold
box_encoding – Specifies the format of boxes data encoding
sort_result_descending – Specifies whether it is necessary to sort selected boxes across batches
output_type – Specifies the output tensor type
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const Output<Node> &max_output_boxes_per_class, const Output<Node> &iou_threshold, const Output<Node> &score_threshold, const Output<Node> &soft_nms_sigma, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true, const ov::element::Type &output_type = ov::element::i64)#
Constructs a NonMaxSuppression operation.
- Parameters:
boxes – Node producing the box coordinates
scores – Node producing the box scores
max_output_boxes_per_class – Node producing maximum number of boxes to be selected per class
iou_threshold – Node producing intersection over union threshold
score_threshold – Node producing minimum score threshold
soft_nms_sigma – Node specifying the sigma parameter for Soft-NMS
box_encoding – Specifies the format of boxes data encoding
sort_result_descending – Specifies whether it is necessary to sort selected boxes across batches
output_type – Specifies the output 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.
-
NonMaxSuppression(const Output<Node> &boxes, const Output<Node> &scores, const BoxEncodingType box_encoding = BoxEncodingType::CORNER, const bool sort_result_descending = true, const ov::element::Type &output_type = ov::element::i64)#
-
class NonZero : public ov::op::Op#
- #include <non_zero.hpp>
NonZero operation returning indices of non-zero elements in the input tensor.
Note
The indices are returned by-dimension in row-major order. For example the following output contains 3 indices of a 3D input tensor elements: [[0, 0, 2], [0, 1, 1], [0, 1, 2]] The values point to input elements at [0,0,0], [0,1,1] and [2,1,2]
Public Functions
-
NonZero(const Output<Node> &arg)#
Constructs a NonZero operation.
Note
The output type is int64.
- Parameters:
arg – Node that produces the input tensor.
-
NonZero(const Output<Node> &arg, const std::string &output_type)#
Constructs a NonZero operation.
- Parameters:
arg – Node that produces the input tensor.
output_type – produce indices. Currently, only ‘int64’ or ‘int32’ are supported
-
NonZero(const Output<Node> &arg, const element::Type &output_type)#
Constructs a NonZero operation.
- Parameters:
arg – Node that produces the input tensor.
output_type – produce indices. Currently, only int64 or int32 are supported
-
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.
-
NonZero(const Output<Node> &arg)#
-
class NormalizeL2 : public ov::op::Op#
- #include <normalize_l2.hpp>
Normalization with L2 norm.
Public Functions
-
NormalizeL2(const Output<Node> &data, const Output<Node> &axes, float eps, EpsMode eps_mode)#
Constructs a NormalizeL2 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.
-
NormalizeL2(const Output<Node> &data, const Output<Node> &axes, float eps, EpsMode eps_mode)#
-
class NotEqual : public ov::op::util::BinaryElementwiseComparison#
- #include <not_equal.hpp>
Elementwise not-equal operation.
Public Functions
-
inline NotEqual()#
Constructs a not-equal operation.
-
NotEqual(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs a not-equal operation.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
inline NotEqual()#
-
class NV12toBGR : public ov::op::util::ConvertColorNV12Base#
- #include <nv12_to_bgr.hpp>
Color conversion operation from NV12 to RGB format. Input:
Input NV12 image can be represented in two ways: a) Single plane (as it is in the file): NV12 height dimension is 1.5x bigger than image height. ‘C’ dimension shall be 1. b) Two separate planes (used this way in many physical video sources): Y and UV. In this case b1) Y plane has height same as image height. ‘C’ dimension equals to 1 b2) UV plane has dimensions: ‘H’ = image_h / 2; ‘W’ = image_w / 2; ‘C’ = 2.
Supported element types: u8 or any supported floating-point type. Output:
Output node will have NHWC layout and shape HxW same as image spatial dimensions.
Number of output channels ‘C’ will be 3, as per interleaved RGB format, first channel is B, last is R
Conversion of each pixel from NV12 (YUV) to RGB space is represented by following formulas: R = 1.164 * (Y - 16) + 1.596 * (V - 128) G = 1.164 * (Y - 16) - 0.813 * (V - 128) - 0.391 * (U - 128) B = 1.164 * (Y - 16) + 2.018 * (U - 128) Then R, G, B values are clipped to range (0, 255)
Public Functions
-
explicit NV12toBGR(const Output<Node> &arg)#
Constructs a conversion operation from input image in NV12 format As per NV12 format definition, node height dimension shall be 1.5 times bigger than image height so that image (w=640, h=480) is represented by NHWC shape {N,720,640,1} (height*1.5 x width)
-
explicit NV12toBGR(const Output<Node> &arg_y, const Output<Node> &arg_uv)#
Constructs a conversion operation from 2-plane input image in NV12 format In general case Y channel of image can be separated from UV channel which means that operation needs two nodes for Y and UV planes respectively. Y plane has one channel, and UV has 2 channels, both expect ‘NHWC’ layout.
- Parameters:
arg_y – Node that produces the input tensor for Y plane (NHWC layout). Shall have WxH dimensions equal to image dimensions. ‘C’ dimension equals to 1.
arg_uv – Node that produces the input tensor for UV plane (NHWC layout). ‘H’ is half of image height, ‘W’ is half of image width, ‘C’ dimension equals to 2. Channel 0 represents ‘U’, channel 1 represents ‘V’ channel
-
class NV12toRGB : public ov::op::util::ConvertColorNV12Base#
- #include <nv12_to_rgb.hpp>
Color conversion operation from NV12 to RGB format. Input:
Input NV12 image can be represented in two ways: a) Single plane (as it is in the file): NV12 height dimension is 1.5x bigger than image height. ‘C’ dimension shall be 1. b) Two separate planes (used this way in many physical video sources): Y and UV. In this case b1) Y plane has height same as image height. ‘C’ dimension equals to 1 b2) UV plane has dimensions: ‘H’ = image_h / 2; ‘W’ = image_w / 2; ‘C’ = 2.
Supported element types: u8 or any supported floating-point type. Output:
Output node will have NHWC layout and shape HxW same as image spatial dimensions.
Number of output channels ‘C’ will be 3, as per interleaved RGB format, first channel is R, last is B
Conversion of each pixel from NV12 (YUV) to RGB space is represented by following formulas: R = 1.164 * (Y - 16) + 1.596 * (V - 128) G = 1.164 * (Y - 16) - 0.813 * (V - 128) - 0.391 * (U - 128) B = 1.164 * (Y - 16) + 2.018 * (U - 128) Then R, G, B values are clipped to range (0, 255)
Public Functions
-
explicit NV12toRGB(const Output<Node> &arg)#
Constructs a conversion operation from input image in NV12 format As per NV12 format definition, node height dimension shall be 1.5 times bigger than image height so that image (w=640, h=480) is represented by NHWC shape {N,720,640,1} (height*1.5 x width)
-
NV12toRGB(const Output<Node> &arg_y, const Output<Node> &arg_uv)#
Constructs a conversion operation from 2-plane input image in NV12 format In general case Y channel of image can be separated from UV channel which means that operation needs two nodes for Y and UV planes respectively. Y plane has one channel, and UV has 2 channels, both expect ‘NHWC’ layout.
- Parameters:
arg_y – Node that produces the input tensor for Y plane (NHWC layout). Shall have WxH dimensions equal to image dimensions. ‘C’ dimension equals to 1.
arg_uv – Node that produces the input tensor for UV plane (NHWC layout). ‘H’ is half of image height, ‘W’ is half of image width, ‘C’ dimension equals to 2. Channel 0 represents ‘U’, channel 1 represents ‘V’ channel
-
class OneHot : public ov::op::Op#
- #include <one_hot.hpp>
OneHot operation.
Public Functions
-
OneHot() = default#
Constructs a one-hot operation.
-
OneHot(const Output<Node> &indices, const Output<Node> &depth, const Output<Node> &on_value, const Output<Node> &off_value, int64_t axis)#
Constructs a one-hot operation.
- Parameters:
indices – Input tensor containing indices.
depth – Specifies number of classes and the size of one-hot dimension.
on_value – Specifies value that the locations in output tensor represented by indices in input take.
off_value – Specifies value that the locations in output tensor not represented by indices in input take.
axis – Axis along which one-hot representation in added.
-
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.
-
inline const int64_t &get_axis() const#
- Returns:
The index of the one-hot axis.
-
OneHot() = default#
-
class Op : public ov::Node#
- #include <op.hpp>
Root of all actual ops.
Subclassed by ov::exec_model_info::ExecutionNode, ov::op::Sink, ov::op::internal::DynamicQuantize, ov::op::internal::NonMaxSuppressionIEInternal, ov::op::internal::RMS, ov::op::internal::RoPE, ov::op::util::AvgPoolBase, ov::op::util::BinaryElementwiseArithmetic, ov::op::util::BinaryElementwiseBitwise, ov::op::util::BinaryElementwiseComparison, ov::op::util::BinaryElementwiseLogical, ov::op::util::BroadcastBase, ov::op::util::ConvertColorI420Base, ov::op::util::ConvertColorNV12Base, ov::op::util::ConvolutionBase, ov::op::util::DetectionOutputBase, ov::op::util::EmbeddingBagOffsetsBase, ov::op::util::EmbeddingBagPackedBase, ov::op::util::FFTBase, ov::op::util::GatherBase, ov::op::util::GatherNDBase, ov::op::util::IndexReduction, ov::op::util::InterpolateBase, ov::op::util::MaxPoolBase, ov::op::util::MulticlassNmsBase, ov::op::util::PadBase, ov::op::util::RNNCellBase, ov::op::util::ROIAlignBase, ov::op::util::ReadValueBase, ov::op::util::ReductionBase, ov::op::util::ScatterBase, ov::op::util::ScatterElementsUpdateBase, ov::op::util::ScatterNDBase, ov::op::util::ShapeOfBase, ov::op::util::SqueezeBase, ov::op::util::TopKBase, ov::op::util::UnaryElementwiseArithmetic, ov::op::v0::BatchNormInference, ov::op::v0::CTCGreedyDecoder, ov::op::v0::Concat, ov::op::v0::Constant, ov::op::v0::Convert, ov::op::v0::CumSum, ov::op::v0::DepthToSpace, ov::op::v0::FakeQuantize, ov::op::v0::HardSigmoid, ov::op::v0::Interpolate, ov::op::v0::LRN, ov::op::v0::MVN, ov::op::v0::MatMul, ov::op::v0::NormalizeL2, ov::op::v0::PRelu, ov::op::v0::PSROIPooling, ov::op::v0::Parameter, ov::op::v0::PriorBox, ov::op::v0::PriorBoxClustered, ov::op::v0::Proposal, ov::op::v0::ROIPooling, ov::op::v0::Range, ov::op::v0::RegionYolo, ov::op::v0::ReorgYolo, ov::op::v0::Result, ov::op::v0::ReverseSequence, ov::op::v0::Selu, ov::op::v0::ShuffleChannels, ov::op::v0::SpaceToDepth, ov::op::v0::Tile, ov::op::v0::Unsqueeze, ov::op::v10::IsFinite, ov::op::v10::IsInf, ov::op::v10::IsNaN, ov::op::v10::Unique, ov::op::v12::GroupNormalization, ov::op::v13::BitwiseNot, ov::op::v13::FakeConvert, ov::op::v13::Multinomial, ov::op::v13::NMSRotated, ov::op::v13::ScaledDotProductAttention, ov::op::v14::ConvertPromoteTypes, ov::op::v14::Inverse, ov::op::v15::Col2Im, ov::op::v15::STFT, ov::op::v15::SearchSorted, ov::op::v15::SliceScatter, ov::op::v15::StringTensorPack, ov::op::v15::StringTensorUnpack, ov::op::v1::BatchToSpace, ov::op::v1::ConvertLike, ov::op::v1::DeformablePSROIPooling, ov::op::v1::GatherTree, ov::op::v1::LogicalNot, ov::op::v1::NonMaxSuppression, ov::op::v1::OneHot, ov::op::v1::Reshape, ov::op::v1::Reverse, ov::op::v1::Select, ov::op::v1::Softmax, ov::op::v1::SpaceToBatch, ov::op::v1::Split, ov::op::v1::StridedSlice, ov::op::v1::Transpose, ov::op::v1::VariadicSplit, ov::op::v3::Bucketize, ov::op::v3::EmbeddingSegmentsSum, ov::op::v3::ExtractImagePatches, ov::op::v3::NonMaxSuppression, ov::op::v3::NonZero, ov::op::v4::CTCLoss, ov::op::v4::Range, ov::op::v4::Swish, ov::op::v5::BatchNormInference, ov::op::v5::LogSoftmax, ov::op::v5::NonMaxSuppression, ov::op::v6::CTCGreedyDecoderSeqLen, ov::op::v6::ExperimentalDetectronDetectionOutput, ov::op::v6::ExperimentalDetectronGenerateProposalsSingleImage, ov::op::v6::ExperimentalDetectronPriorGridGenerator, ov::op::v6::ExperimentalDetectronROIFeatureExtractor, ov::op::v6::ExperimentalDetectronTopKROIs, ov::op::v6::GatherElements, ov::op::v6::MVN, ov::op::v7::Einsum, ov::op::v7::Roll, ov::op::v8::AdaptiveAvgPool, ov::op::v8::AdaptiveMaxPool, ov::op::v8::MatrixNms, ov::op::v8::PriorBox, ov::op::v8::RandomUniform, ov::op::v8::Slice, ov::op::v8::Softmax, ov::op::v9::Eye, ov::op::v9::GenerateProposals, ov::op::v9::GridSample, ov::op::v9::NonMaxSuppression
-
class Pad : public ov::op::util::PadBase#
- #include <pad.hpp>
Generic padding operation.
Public Functions
-
Pad() = default#
Constructs a Pad-1 operation.
-
Pad(const Output<Node> &arg, const Output<Node> &pads_begin, const Output<Node> &pads_end, const Output<Node> &arg_pad_value, PadMode pad_mode)#
Constructs a Pad-1 operation.
- Parameters:
arg – The output producing input tensor to be padded.
pads_begin – The output which specifies the number of padding elements added before position 0 on each axis of arg.
pads_end – The output which specifies the number of padding elements after the last element on each axis.
arg_pad_value – The scalar output with the value used for padding if pad_mode is CONSTANT
pad_mode – The padding mode: CONSTANT, EDGE, REFLECT or SYMMETRIC. CONSTANT initializes new elements with arg_pad_value, EDGE uses the nearest value from arg. REFLECT and SYMMETRIC tile the background by flipping arg at the edge (SYMMETRIC) or on the last row/column/etc. (REFLECT).
-
Pad(const Output<Node> &arg, const Output<Node> &pads_begin, const Output<Node> &pads_end, PadMode pad_mode)#
Constructs a Pad-1 operation.
- Parameters:
arg – The output producing input tensor to be padded.
pads_begin – The output which specifies the number of padding elements added
pads_end – The output which specifies the number of padding elements after the last element on each axis.
pad_mode – The padding mode: CONSTANT, EDGE, REFLECT or SYMMETRIC.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
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
-
Pad() = default#
-
class Pad : public ov::op::util::PadBase#
- #include <pad.hpp>
Generic padding operation.
Public Functions
-
Pad() = default#
Constructs a Pad-12 operation.
-
Pad(const Output<Node> &arg, const Output<Node> &pads_begin, const Output<Node> &pads_end, PadMode pad_mode)#
Constructs a Pad-12 operation.
- Parameters:
arg – The output producing input tensor to be padded.
pads_begin – The output which specifies the number of padding elements to add (or remove) before position 0 on each axis of arg.
pads_end – The output which specifies the number of padding elements to add (or remove) after the last element on each axis.
pad_mode – The padding mode: CONSTANT, EDGE, REFLECT or SYMMETRIC.
-
Pad(const Output<Node> &arg, const Output<Node> &pads_begin, const Output<Node> &pads_end, const Output<Node> &arg_pad_value, PadMode pad_mode)#
Constructs a Pad-12 operation.
- Parameters:
arg – The output producing input tensor to be padded.
pads_begin – The output which specifies the number of padding elements to add (or remove) before position 0 on each axis of arg.
pads_end – The output which specifies the number of padding elements to add (or remove) after the last element on each axis.
arg_pad_value – The scalar output with the value used for padding if pad_mode is CONSTANT
pad_mode – The padding mode: CONSTANT, EDGE, REFLECT or SYMMETRIC.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
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
-
Pad() = default#
-
class Parameter : public ov::op::Op#
- #include <parameter.hpp>
A model parameter.
Parameters are nodes that represent the arguments that will be passed to user-defined models. Model creation requires a sequence of parameters. Basic graph operations do not need parameters attached to a model.
Public Functions
-
Parameter() = default#
Constructions a tensor-typed parameter node.
-
Parameter(const ov::element::Type &element_type, const PartialShape &pshape)#
Constructions a tensor-typed parameter node.
- Parameters:
element_type – The element type of the parameter.
pshape – The partial shape of the parameter.
-
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.
-
Parameter() = default#
-
class Power : public ov::op::util::BinaryElementwiseArithmetic#
- #include <power.hpp>
Elementwise exponentiation operation.
Inputs
Type
Description
arg0
\(N[d_1,\dots,d_n]~(n \geq 0)\)
A tensor of any shape and numeric element type.
arg1
\(N[d_1,\dots,d_n]~(n \geq 0)\)
A tensor of the same shape and element type as
arg0
.Type
Description
\(N[d_1,\dots,d_n]\)
The tensor \(T\), where \(T[i_1,\dots,i_n] = \texttt{arg0}[i_1,\dots,i_n]^{\texttt{arg1}[i_1,\dots,i_n]}\)
Public Functions
-
Power(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs an exponentiation operation.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Power(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
-
class PRelu : public ov::op::Op#
- #include <prelu.hpp>
Parametrized Relu x < 0 => f(x) = x * slope x >= 0 => f(x) = x.
Public Functions
-
PRelu(const Output<Node> &data, const Output<Node> &slope)#
Constructs a PRelu operation.
- Parameters:
data – Input tensor
slope – Multipliers 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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
PRelu(const Output<Node> &data, const Output<Node> &slope)#
-
class PriorBox : public ov::op::Op#
- #include <prior_box.hpp>
Layer which generates prior boxes of specified sizes normalized to input image size.
Public Functions
-
PriorBox(const Output<Node> &layer_shape, const Output<Node> &image_shape, const Attributes &attrs)#
Constructs a PriorBox 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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
struct Attributes#
- #include <prior_box.hpp>
-
PriorBox(const Output<Node> &layer_shape, const Output<Node> &image_shape, const Attributes &attrs)#
-
class PriorBox : public ov::op::Op#
- #include <prior_box.hpp>
Layer which generates prior boxes of specified sizes normalized to input image size.
Public Functions
-
PriorBox(const Output<Node> &layer_shape, const Output<Node> &image_shape, const Attributes &attrs)#
Constructs a PriorBox 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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
struct Attributes#
- #include <prior_box.hpp>
-
PriorBox(const Output<Node> &layer_shape, const Output<Node> &image_shape, const Attributes &attrs)#
-
class PriorBoxClustered : public ov::op::Op#
- #include <prior_box_clustered.hpp>
Layer which generates prior boxes of specified sizes normalized to input image size.
Public Functions
-
PriorBoxClustered(const Output<Node> &layer_shape, const Output<Node> &image_shape, const Attributes &attrs)#
Constructs a PriorBoxClustered operation.
- Parameters:
layer_shape – Shape of layer for which prior boxes are computed
image_shape – Shape of image to which prior boxes are scaled
attrs – PriorBoxClustered 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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
struct Attributes#
- #include <prior_box_clustered.hpp>
-
PriorBoxClustered(const Output<Node> &layer_shape, const Output<Node> &image_shape, const Attributes &attrs)#
-
class Proposal : public ov::op::Op#
- #include <proposal.hpp>
Proposal operation.
Subclassed by ov::op::v4::Proposal
Public Functions
-
Proposal(const Output<Node> &class_probs, const Output<Node> &bbox_deltas, const Output<Node> &image_shape, const Attributes &attrs)#
Constructs a Proposal 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.
-
void set_attrs(Attributes attrs)#
Set the Proposal operator attributes.
- Parameters:
attrs – Attributes to be set.
-
struct Attributes#
- #include <proposal.hpp>
-
Proposal(const Output<Node> &class_probs, const Output<Node> &bbox_deltas, const Output<Node> &image_shape, const Attributes &attrs)#
-
class Proposal : public ov::op::v0::Proposal#
- #include <proposal.hpp>
Proposal operation.
Public Functions
-
Proposal(const Output<Node> &class_probs, const Output<Node> &bbox_deltas, const Output<Node> &image_shape, const Attributes &attrs)#
Constructs a Proposal 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.
-
Proposal(const Output<Node> &class_probs, const Output<Node> &bbox_deltas, const Output<Node> &image_shape, const Attributes &attrs)#
-
class PSROIPooling : public ov::op::Op#
- #include <psroi_pooling.hpp>
PSROIPooling operation.
Public Functions
-
PSROIPooling(const Output<Node> &input, const Output<Node> &coords, const size_t output_dim, const size_t group_size, const float spatial_scale, int spatial_bins_x, int spatial_bins_y, const std::string &mode)#
Constructs a PSROIPooling operation.
- Parameters:
input – Input feature map {N, C, …}
coords – Coordinates of bounding boxes
output_dim – Output channel number
group_size – Number of groups to encode position-sensitive scores
spatial_scale – Ratio of input feature map over input image size
spatial_bins_x – Numbers of bins to divide the input feature maps over width
spatial_bins_y – Numbers of bins to divide the input feature maps over height
mode – Mode of pooling - Avg or Bilinear
-
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_output_dim(size_t output_dim)#
Set the output channel dimension size.
- Parameters:
output_dim – Channel dimension size.
-
void set_group_size(size_t group_size)#
Set the output groups number.
- Parameters:
group_size – Number of groups.
-
void set_spatial_scale(float scale)#
Set the spatial scale.
- Parameters:
scale – Spatial scale value.
-
void set_spatial_bins_x(int x)#
Set the number of bins over image width.
- Parameters:
x – Number of bins over width (x) axis.
-
void set_spatial_bins_y(int y)#
Set the number of bins over image height.
- Parameters:
y – Number of bins over height (y) axis.
-
void set_mode(std::string mode)#
Set the pooling mode.
- Parameters:
mode – Pooling mode name.
-
PSROIPooling(const Output<Node> &input, const Output<Node> &coords, const size_t output_dim, const size_t group_size, const float spatial_scale, int spatial_bins_x, int spatial_bins_y, const std::string &mode)#
-
class RandomUniform : public ov::op::Op#
- #include <random_uniform.hpp>
Tensor RandomUniform operation.
Public Functions
-
RandomUniform(const Output<Node> &out_shape, const Output<Node> &min_val, const Output<Node> &max_val, const ov::element::Type &out_type, uint64_t global_seed = 0, uint64_t op_seed = 0, ov::op::PhiloxAlignment alignment = ov::op::PhiloxAlignment::TENSORFLOW)#
Constructs a RandomUniform operation.
- Parameters:
out_shape – Node producing the tensor with output shape.
min_val – Node producing the tensor with minimum value.
max_val – Node producing the tensor with maximum value.
out_type – Output type of the tensor.
global_seed – Global seed value.
op_seed – Operational seed value.
alignment – Alignment of numbers generated by Philox algorithm based on provided seed.
-
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 can_constant_fold(const OutputVector &inputs_values) const override#
- Returns:
Turns off constant folding for RandomUniform operation.
-
uint64_t get_global_seed() const#
- Returns:
The global seed value.
-
uint64_t get_op_seed() const#
- Returns:
The operational seed value.
-
std::pair<uint64_t, uint64_t> get_state() const#
- Returns:
The state value.
-
ov::op::PhiloxAlignment get_alignment() const#
- Returns:
The alignment mode.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
RandomUniform(const Output<Node> &out_shape, const Output<Node> &min_val, const Output<Node> &max_val, const ov::element::Type &out_type, uint64_t global_seed = 0, uint64_t op_seed = 0, ov::op::PhiloxAlignment alignment = ov::op::PhiloxAlignment::TENSORFLOW)#
-
class Range : public ov::op::Op#
- #include <range.hpp>
Range operation, analogous to
arange()
in Numpy.Public Functions
-
Range() = default#
Constructs an unitialized range operation.
-
Range(const Output<Node> &start, const Output<Node> &stop, const Output<Node> &step, element::Type output_type)#
Constructs a range operation.
- Parameters:
start – The tensor producing the start value. Must be a scalar of numeric element type.
stop – The tensor producing the stop value. Must be a scalar of numeric element type.
step – The tensor producing the step value. Must be a scalar of numeric element type.
output_type – The type of the 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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Range() = default#
-
class Range : public ov::op::Op#
- #include <range.hpp>
Range operation, analogous to
range()
in Python.Public Functions
-
Range() = default#
Constructs an unitialized range operation.
-
Range(const Output<Node> &start, const Output<Node> &stop, const Output<Node> &step)#
Constructs a range operation.
- Parameters:
start – The tensor producing the start value. Must be a scalar of integer element type, and same element type as
stop
andstep
.stop – The tensor producing the stop value. Must be a scalar of integer element type, and same element type as
start
andstep
.step – The tensor producing the step value. Must be a scalar of integer element type, and same element type as
start
andstop
.
-
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.
-
Range() = default#
-
class ReadValue : public ov::op::util::ReadValueBase#
- #include <read_value.hpp>
ReadValue operation creates the variable with
variable_id
and returns value of this variable.Public Functions
-
ReadValue(const Output<Node> &init_value, const std::string &variable_id)#
Constructs a ReadValue operation.
- Parameters:
init_value – Node that produces the input tensor.
variable_id – identificator of the variable to create.
-
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.
-
ReadValue(const Output<Node> &init_value, const std::string &variable_id)#
-
class ReadValue : public ov::op::util::ReadValueBase#
- #include <read_value.hpp>
ReadValue operation gets an input value from the variable with
variable_id
and returns it as an output.Public Functions
Constructs a ReadValue operation.
- Parameters:
variable – Class for storing and synchronizing element types, shapes and identifiers between pairs of Assign/ReadValue nodes.
Constructs a ReadValue operation.
- Parameters:
init_value – Node 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 ReduceL1 : public ov::op::util::ArithmeticReductionKeepDims#
- #include <reduce_l1.hpp>
Reduction operation using L1 norm: L1(x) = sum(abs(x)) if all dimensions are specified for the normalisation.
Reduces the tensor, eliminating the specified reduction axes by taking the L1-norm.
Public Functions
-
ReduceL1() = default#
Constructs a reducet L1-norm operation.
-
ReduceL1(const Output<Node> &arg, const Output<Node> &reduction_axes, bool keep_dims = false)#
Constructs a reduce L1-norm operation.
- Parameters:
arg – The tensor to be reduced.
reduction_axes – The axis positions (0-based) to be eliminated.
keep_dims – If set to true it holds axes that are used for reduction.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
ReduceL1() = default#
-
class ReduceL2 : public ov::op::util::ArithmeticReductionKeepDims#
- #include <reduce_l2.hpp>
Reduction operation using L2 norm:
Reduces the tensor, eliminating the specified reduction axes by taking the L2-norm.
Public Functions
-
ReduceL2() = default#
Constructs a reducet L2-norm operation.
-
ReduceL2(const Output<Node> &arg, const Output<Node> &reduction_axes, bool keep_dims = false)#
Constructs a reduce L2-norm operation.
- Parameters:
arg – The tensor to be reduced.
reduction_axes – The axis positions (0-based) to be eliminated.
keep_dims – If set to true it holds axes that are used for reduction.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
ReduceL2() = default#
-
class ReduceLogicalAnd : public ov::op::util::LogicalReductionKeepDims#
- #include <reduce_logical_and.hpp>
Performs a reduction using “logical and”.
The reduction is performed over slices of the first input. The slices shape depends on the values passed to the second input - the axes.
Public Functions
-
ReduceLogicalAnd(const Output<Node> &data, const Output<Node> &reduction_axes, const bool keep_dims = false)#
Constructs a ReduceLogicalAnd node.
- Parameters:
data – - The input tensor with data to be reduced
reduction_axes – - The input tensor with information about axes over which the first tensor should be sliced prior to the reduction operation
keep_dims – - Indicates if the axes used for reduction should be held/kept
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
ReduceLogicalAnd(const Output<Node> &data, const Output<Node> &reduction_axes, const bool keep_dims = false)#
-
class ReduceLogicalOr : public ov::op::util::LogicalReductionKeepDims#
- #include <reduce_logical_or.hpp>
Performs a reduction using “logical or”.
The reduction is performed over slices of the first input. The slices shape depends on the values passed to the second input - the axes.
Public Functions
-
ReduceLogicalOr(const Output<Node> &data, const Output<Node> &reduction_axes, const bool keep_dims = false)#
Constructs a ReduceLogicalOr node.
- Parameters:
data – - The input tensor with data to be reduced
reduction_axes – - The input tensor with information about axes over which the first tensor should be sliced prior to the reduction operation
keep_dims – - Indicates if the axes used for reduction should be held/kept
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
ReduceLogicalOr(const Output<Node> &data, const Output<Node> &reduction_axes, const bool keep_dims = false)#
-
class ReduceMax : public ov::op::util::ArithmeticReductionKeepDims#
- #include <reduce_max.hpp>
ReduceMax operation.
Public Functions
-
ReduceMax() = default#
Constructs a summation operation.
-
ReduceMax(const Output<Node> &arg, const Output<Node> &reduction_axes, bool keep_dims = false)#
Constructs a summation operation.
- Parameters:
arg – The tensor to be summed.
reduction_axes – The axis positions (0-based) to be eliminated.
keep_dims – If set to 1 it holds axes that are used for reduction.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
ReduceMax() = default#
-
class ReduceMean : public ov::op::util::ArithmeticReductionKeepDims#
- #include <reduce_mean.hpp>
ReduceMean operation.
Public Functions
-
ReduceMean(const Output<Node> &arg, const Output<Node> &reduction_axes, bool keep_dims = false)#
- Parameters:
arg – The tensor to be summed.
reduction_axes – The axis positions (0-based) to be eliminated.
keep_dims – If set to 1 it holds axes that are used for reduction.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
ReduceMean(const Output<Node> &arg, const Output<Node> &reduction_axes, bool keep_dims = false)#
-
class ReduceMin : public ov::op::util::ArithmeticReductionKeepDims#
- #include <reduce_min.hpp>
ReduceMin operation.
Public Functions
-
ReduceMin() = default#
Constructs a summation operation.
-
ReduceMin(const Output<Node> &arg, const Output<Node> &reduction_axes, bool keep_dims = false)#
Constructs a summation operation.
- Parameters:
arg – The tensor to be summed.
reduction_axes – The axis positions (0-based) to be eliminated.
keep_dims – If set to 1 it holds axes that are used for reduction.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
ReduceMin() = default#
-
class ReduceProd : public ov::op::util::ArithmeticReductionKeepDims#
- #include <reduce_prod.hpp>
Product reduction operation.
Reduces the tensor, eliminating the specified reduction axes by taking the product.
Public Functions
-
ReduceProd() = default#
Constructs a product reduction operation.
-
ReduceProd(const Output<Node> &arg, const Output<Node> &reduction_axes, bool keep_dims = false)#
Constructs a product reduction operation.
- Parameters:
arg – The tensor to be reduced.
reduction_axes – The axis positions (0-based) to be eliminated.
keep_dims – If set to true it holds axes that are used for reduction.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
ReduceProd() = default#
-
class ReduceSum : public ov::op::util::ArithmeticReductionKeepDims#
- #include <reduce_sum.hpp>
Tensor sum operation.
Element-wise sums the input tensor, eliminating the specified reduction axes. For example:
\[\begin{split} \mathit{sum}\left(\{0\}, \left[ \begin{array}{ccc} 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{array} \right]\right) = \left[ (1 + 3 + 5), (2 + 4 + 6) \right] = \left[ 9, 12 \right]~~~\text{(dimension 0 (rows) is eliminated)} \end{split}\]\[\begin{split} \mathit{sum}\left(\{1\}, \left[ \begin{array}{ccc} 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{array} \right]\right) = \left[ (1 + 2), (3 + 4), (5 + 6) \right] = \left[ 3, 7, 11 \right]~~~\text{(dimension 1 (columns) is eliminated)} \end{split}\]\[\begin{split} \mathit{sum}\left(\{0,1\}, \left[ \begin{array}{ccc} 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{array} \right]\right) = (1 + 2) + (3 + 4) + (5 + 6) = 21~~~\text{(both dimensions (rows and columns) are eliminated)} \end{split}\]Parameters
Description
reduction_axes
The axes to eliminate through summation.
keep_dims
If set to 1 it holds axes that are used for reduction.
Inputs
Type
Description
arg
\(N[d_1,\dots,d_n]~(n \geq 0)\)
An input tensor of any shape and numeric element type.
Type
Description
\(N[\textit{delete}(A,d_1,\dots,d_n)]\)
The tensor \(T\), where \(T\) is the input tensor with the
reduction_axes
\(A\) eliminated by summation.Public Functions
-
ReduceSum() = default#
Constructs a summation operation.
-
ReduceSum(const Output<Node> &arg, const Output<Node> &reduction_axes, bool keep_dims = false)#
Constructs a summation operation.
- Parameters:
arg – The tensor to be summed.
reduction_axes – The axis positions (0-based) to be eliminated.
keep_dims – If set to 1 it holds axes that are used for reduction.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
ReduceSum() = default#
-
class RegionYolo : public ov::op::Op#
- #include <region_yolo.hpp>
RegionYolo operation.
Public Functions
-
RegionYolo(const Output<Node> &input, const size_t coords, const size_t classes, const size_t regions, const bool do_softmax, const std::vector<int64_t> &mask, const int axis, const int end_axis, const std::vector<float> &anchors = std::vector<float>{})#
Constructs a RegionYolo operation.
- Parameters:
input – [in] Input
coords – [in] Number of coordinates for each region
classes – [in] Number of classes for each region
regions – [in] Number of regions
do_softmax – [in] Compute softmax
mask – [in] Mask
axis – [in] Axis to begin softmax on
end_axis – [in] Axis to end softmax on
anchors – [in] A flattened list of pairs
[width, height]
that describes prior box 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.
-
RegionYolo(const Output<Node> &input, const size_t coords, const size_t classes, const size_t regions, const bool do_softmax, const std::vector<int64_t> &mask, const int axis, const int end_axis, const std::vector<float> &anchors = std::vector<float>{})#
-
class Relu : public ov::op::util::UnaryElementwiseArithmetic#
- #include <relu.hpp>
Elementwise Relu operation.
-
class ReorgYolo : public ov::op::Op#
- #include <reorg_yolo.hpp>
ReorgYolo operation.
Public Functions
-
ReorgYolo(const Output<Node> &input, const size_t stride)#
Constructs a ReorgYolo operation.
- Parameters:
input – Input
stride – Stride to reorganize input by
-
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.
-
ReorgYolo(const Output<Node> &input, const size_t stride)#
-
class Reshape : public ov::op::Op#
- #include <reshape.hpp>
Tensor dynamic reshape operation.
“Converts” an input tensor into a new shape with the same number of elements. This op does not touch the actual data. If needed, use Transpose for that purpose.
Public Functions
-
Reshape(const Output<Node> &arg, const Output<Node> &shape_pattern, bool special_zero)#
Constructs a dynamic reshape operation. This operation does not perform transpose.
- Parameters:
arg – The tensor to be reshaped.
shape_pattern – The node that defines output shape shape_pattern. If the input shape is \((a_0,\dots,a_{k-1})\) then the output shape must be of the form \((b_0,\dots,b_{j-1})\) where \(\Pi(a_i) = \Pi(b_i)\). A value of -1 is allowed for at most one dimension, in which case the dimension size is inferred based on element count of input tensor.
special_zero – Treats zeros in
shape_pattern
as wildcard flags indicating a copy from input shape at the same index.
-
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.
-
Reshape(const Output<Node> &arg, const Output<Node> &shape_pattern, bool special_zero)#
-
class Result : public ov::op::Op#
- #include <result.hpp>
Result operation.
Public Functions
-
Result() = default#
Allows a value to be used as a function result.
-
Result(const Output<Node> &arg)#
Allows a value to be used as a function result.
- Parameters:
arg – Node 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.
-
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.
-
Result() = default#
-
class Reverse : public ov::op::Op#
- #include <reverse.hpp>
Reverse operation.
Public Functions
-
Reverse(const Output<Node> &data, const Output<Node> &reversed_axes, const std::string &mode)#
Constructs a reverse operation.
- Parameters:
data – The input tensor, some of whose axes are to be reversed.
reversed_axes – The axes to reverse in a form of a set of indices or boolean mask.
mode – The way reversed_axes should be interpreted - a set or a mask.
-
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 Mode get_mode() const#
- Returns:
The second input data interpretation mode.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Reverse(const Output<Node> &data, const Output<Node> &reversed_axes, const std::string &mode)#
-
class ReverseSequence : public ov::op::Op#
- #include <reverse_sequence.hpp>
ReverseSequence operation.
Public Functions
-
ReverseSequence(const Output<Node> &arg, const Output<Node> &seq_lengths, int64_t batch_axis = 0, int64_t seq_axis = 1)#
Constructs a ReverseSequence operation.
- Parameters:
arg – tensor with input data to reverse
seq_lengths – 1D tensor of integers with sequence lengths in the input tensor.
batch_axis – index of the batch dimension.
seq_axis – index of the sequence dimension.
-
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.
-
ReverseSequence(const Output<Node> &arg, const Output<Node> &seq_lengths, int64_t batch_axis = 0, int64_t seq_axis = 1)#
-
class RNNCell : public ov::op::util::RNNCellBase#
- #include <rnn_cell.hpp>
Class for single RNN cell node.
See also
LSTMSequence, LSTMCell, GRUCell
Note
It follows notation and equations defined as in ONNX standard: onnx/onnx
Note
It calculates following equations:
Ht = f(Xt*(Wi^T) + Ht-1*(Ri^T) + Wbi + Rbi) * - Is a dot product, f - is activation functions.
Note
This class represents only single cell (for current time step) and not the whole RNN Sequence layer
Public Functions
-
RNNCell(const Output<Node> &X, const Output<Node> &initial_hidden_state, const Output<Node> &W, const Output<Node> &R, std::size_t hidden_size, const std::vector<std::string> &activations = std::vector<std::string>{"tanh"}, const std::vector<float> &activations_alpha = {}, const std::vector<float> &activations_beta = {}, float clip = 0.f)#
Constructs RNNCell node.
- Parameters:
X – [in] The input tensor with shape: [batch_size, input_size].
initial_hidden_state – [in] The hidden state tensor at current time step with shape: [batch_size, hidden_size].
W – [in] The weight tensor with shape: [hidden_size, input_size].
R – [in] The recurrence weight tensor with shape: [hidden_size, hidden_size].
hidden_size – [in] The number of hidden units for recurrent cell.
activations – [in] The vector of activation functions used inside recurrent cell.
activations_alpha – [in] The vector of alpha parameters for activation functions in order respective to activation list.
activations_beta – [in] The vector of beta parameters for activation functions in order respective to activation list.
clip – [in] The value defining clipping range [-clip, clip] on input of activation functions.
-
RNNCell(const Output<Node> &X, const Output<Node> &initial_hidden_state, const Output<Node> &W, const Output<Node> &R, const Output<Node> &B, std::size_t hidden_size, const std::vector<std::string> &activations = std::vector<std::string>{"tanh"}, const std::vector<float> &activations_alpha = {}, const std::vector<float> &activations_beta = {}, float clip = 0.f)#
Constructs RNNCell node.
- Parameters:
X – [in] The input tensor with shape: [batch_size, input_size].
initial_hidden_state – [in] The hidden state tensor at current time step with shape: [batch_size, hidden_size].
W – [in] The weight tensor with shape: [hidden_size, input_size].
R – [in] The recurrence weight tensor with shape: [hidden_size, hidden_size].
B – [in] The bias tensor for input gate with shape: [hidden_size].
hidden_size – [in] The number of hidden units for recurrent cell.
activations – [in] The vector of activation functions used inside recurrent cell.
activations_alpha – [in] The vector of alpha parameters for activation functions in order respective to activation list.
activations_beta – [in] The vector of beta parameters for activation functions in order respective to activation list.
clip – [in] The value defining clipping range [-clip, clip] on input of activation 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.
-
RNNCell(const Output<Node> &X, const Output<Node> &initial_hidden_state, const Output<Node> &W, const Output<Node> &R, std::size_t hidden_size, const std::vector<std::string> &activations = std::vector<std::string>{"tanh"}, const std::vector<float> &activations_alpha = {}, const std::vector<float> &activations_beta = {}, float clip = 0.f)#
-
class RNNSequence : public ov::op::util::RNNCellBase#
- #include <rnn_sequence.hpp>
RNNSequence 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.
-
virtual void validate_and_infer_types() override#
-
class ROIAlign : public ov::op::util::ROIAlignBase#
- #include <roi_align.hpp>
ROIAlign operation.
Public Functions
-
ROIAlign(const Output<Node> &input, const Output<Node> &rois, const Output<Node> &batch_indices, const int pooled_h, const int pooled_w, const int sampling_ratio, const float spatial_scale, const std::string &mode)#
Constructs a ROIAlign node matching the ONNX ROIAlign specification Check util::ROIAlignBase for description of common params.
- Parameters:
mode – Method of pooling - ‘avg’ or ‘max’
-
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.
-
ROIAlign(const Output<Node> &input, const Output<Node> &rois, const Output<Node> &batch_indices, const int pooled_h, const int pooled_w, const int sampling_ratio, const float spatial_scale, const std::string &mode)#
-
class ROIAlignRotated : public ov::op::util::ROIAlignBase#
- #include <roi_align_rotated.hpp>
ROIAlignRotated operation.
Public Functions
-
ROIAlignRotated(const Output<Node> &input, const Output<Node> &rois, const Output<Node> &batch_indices, const int pooled_h, const int pooled_w, const int sampling_ratio, const float spatial_scale, const bool clockwise_mode)#
Constructs a ROIAlignRotated operation.
- Parameters:
input – Input feature map {N, C, H, W}
rois – Regions of interest to pool over
batch_indices – Indices of images in the batch matching the number or ROIs
pooled_h – Height of the ROI output features
pooled_w – Width of the ROI output features
sampling_ratio – Number of sampling points used to compute an output element
spatial_scale – Spatial scale factor used to translate ROI coordinates
clockwise_mode – If true, rotation angle is interpreted as clockwise, otherwise as counterclockwise
-
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.
-
ROIAlignRotated(const Output<Node> &input, const Output<Node> &rois, const Output<Node> &batch_indices, const int pooled_h, const int pooled_w, const int sampling_ratio, const float spatial_scale, const bool clockwise_mode)#
-
class ROIPooling : public ov::op::Op#
- #include <roi_pooling.hpp>
ROIPooling operation.
Public Functions
-
ROIPooling(const Output<Node> &input, const Output<Node> &coords, const Shape &output_size, const float spatial_scale, const std::string &method = "max")#
Constructs a ROIPooling operation.
- Parameters:
input – Input feature map {N, C, H, W}
coords – Coordinates of bounding boxes
output_size – Height/Width of ROI output features
spatial_scale – Ratio of input feature map over input image size
method – Method of pooling - Max or Bilinear
-
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_output_roi(Shape output_size)#
Set the output ROI feature map (pooled_h, pooled_w).
- Parameters:
output_size – Shape with pooling attributes pooled_h and pooled_w sizes.
-
const Shape &get_output_roi() const#
Get the output ROI feature map shape (H x W)
- Returns:
Shape with pooled_h and pooled_w attributes.
-
void set_spatial_scale(float scale)#
Set the spatial scale value.
- Parameters:
scale – Scale value to set.
-
void set_method(std::string method_name)#
Set the method of pooling.
- Parameters:
method_name – Pooling method name.
-
ROIPooling(const Output<Node> &input, const Output<Node> &coords, const Shape &output_size, const float spatial_scale, const std::string &method = "max")#
-
class Roll : public ov::op::Op#
- #include <roll.hpp>
Tensor roll operation.
Public Functions
-
Roll(const Output<Node> &data, const Output<Node> &shift, const Output<Node> &axes)#
Constructs a roll 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.
-
Roll(const Output<Node> &data, const Output<Node> &shift, const Output<Node> &axes)#
-
class Round : public ov::op::util::UnaryElementwiseArithmetic#
- #include <round.hpp>
Elementwise round operation. The output is round to the nearest integer for each value. In case of halfs, the rule is defined in attribute ‘mode’: ‘HALF_TO_EVEN’ - round halfs to the nearest even integer. ‘HALF_AWAY_FROM_ZERO’: - round in such a way that the result heads away from zero.
Public Functions
-
Round() = default#
Constructs a round operation.
-
Round(const Output<Node> &arg, const RoundMode mode)#
Constructs a round operation.
- Parameters:
arg – Node that produces the input tensor.
mode – Rule to resolve halfs
-
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.
-
Round() = default#
-
class ScaledDotProductAttention : public ov::op::Op#
- #include <scaled_dot_product_attention.hpp>
Scaled dot product attention operation from PyTorch.
Public Functions
-
ScaledDotProductAttention() = default#
Constructs a ScaledDotProductAttention 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.
-
ScaledDotProductAttention() = default#
-
class ScatterElementsUpdate : public ov::op::util::ScatterElementsUpdateBase#
- #include <scatter_elements_update.hpp>
ScatterElementsUpdate operation.
Public Functions
-
ScatterElementsUpdate(const Output<Node> &data, const Output<Node> &indices, const Output<Node> &updates, const Output<Node> &axis)#
Constructs a ScatterElementsUpdate node.
- Parameters:
data – Input data
indices – Data entry index that will be updated
updates – Update values
axis – Axis to scatter on
-
ScatterElementsUpdate(const Output<Node> &data, const Output<Node> &indices, const Output<Node> &updates, const Output<Node> &axis)#
-
class ScatterNDUpdate : public ov::op::util::ScatterNDBase#
- #include <scatter_nd_update.hpp>
Add updates to slices from inputs addressed by indices.
Public Functions
-
inline ScatterNDUpdate(const Output<Node> &inputs, const Output<Node> &indices, const Output<Node> &updates)#
- Parameters:
inputs – Tensor
indices – Index tensor: Data type must be
element::i32
orelement::i64
updates – Tensor: Must have same type as inputs
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
inline ScatterNDUpdate(const Output<Node> &inputs, const Output<Node> &indices, const Output<Node> &updates)#
-
class ScatterNDUpdate : public ov::op::util::ScatterNDBase#
- #include <scatter_nd_update.hpp>
Add updates to slices from inputs addressed by indices.
Public Types
Public Functions
-
ScatterNDUpdate(const Output<Node> &inputs, const Output<Node> &indices, const Output<Node> &updates, const Reduction reduction = Reduction::NONE)#
- Parameters:
inputs – Tensor
indices – Index tensor: Data type must be
element::i32
orelement::i64
updates – Tensor: Must have same type as inputs
reduction – Reduction: Type of operation to perform on inputs
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
ScatterNDUpdate(const Output<Node> &inputs, const Output<Node> &indices, const Output<Node> &updates, const Reduction reduction = Reduction::NONE)#
-
class ScatterUpdate : public ov::op::util::ScatterBase#
- #include <scatter_update.hpp>
Set new values to slices from data addressed by indices.
Public Functions
-
ScatterUpdate(const Output<Node> &data, const Output<Node> &indices, const Output<Node> &updates, const Output<Node> &axis)#
Constructs ScatterUpdate operator object.
- Parameters:
data – The input tensor to be updated.
indices – The tensor with indexes which will be updated.
updates – The tensor with update values.
axis – [in] The axis at which elements will be updated.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
ScatterUpdate(const Output<Node> &data, const Output<Node> &indices, const Output<Node> &updates, const Output<Node> &axis)#
-
class SearchSorted : public ov::op::Op#
- #include <search_sorted.hpp>
SearchSorted operation.
Public Functions
-
SearchSorted(const Output<Node> &sorted_sequence, const Output<Node> &values, bool right_mode = false, const element::Type &output_type = element::i64)#
Constructs a SearchSorted operation.
- Parameters:
sorted_sequence – Sorted sequence to search in.
values – Values to search indexs for.
right_mode – If False, return the first suitable index that is found for given value. If True, return the last such index.
output_type – The element type of the output tensor. This is purely an implementation flag, which is used to convert the output type for CPU plugin in ConvertPrecision transformation (and potentially other plugins as well). Setting this flag to element::i32 will result in the output tensor of i32 element type. Setting this flag to element::i64 will generally not give any effect, since it will be converted to i32 anyway, at least for CPU plugin.
-
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.
-
SearchSorted(const Output<Node> &sorted_sequence, const Output<Node> &values, bool right_mode = false, const element::Type &output_type = element::i64)#
-
class Select : public ov::op::Op#
- #include <select.hpp>
Elementwise selection operation.
Inputs
Type
Description
arg0
\(\texttt{bool}[d_1,\dots,d_n]~(n \geq 0)\)
A tensor of any shape, with element
bool
.arg1
\(E[d_1,\dots,d_n]~(n \geq 0)\)
A tensor of a shape that is broadcast-compatible with
arg0
, with any element type.arg2
\(E[d_1,\dots,d_n]~(n \geq 0)\)
A tensor of a shape that is broadcast-compatible with
arg0
, and same element type asarg1
.auto_broadcast
Auto broadcast specification.
Type
Description
\(E[d_1,\dots,d_n]\)
The tensor \(T\), where \(T[i_1,\dots,i_n] = \texttt{arg1}[i_1,\dots,i_n]\text{ if }\texttt{arg0}[i_1,\dots,i_n] \neq 0\text{, else }\texttt{arg2}[i_1,\dots,i_n]\)
Public Functions
-
inline Select()#
Constructs a selection operation.
-
Select(const Output<Node> &arg0, const Output<Node> &arg1, const Output<Node> &arg2, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs a selection 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.
-
inline virtual const AutoBroadcastSpec &get_autob() const override#
- Returns:
the autobroadcasr spec
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
inline Select()#
-
class Selu : public ov::op::Op#
- #include <selu.hpp>
Performs a SELU activation function on all elements of the input node.
Public Functions
-
Selu(const Output<Node> &data, const Output<Node> &alpha, const Output<Node> &lambda)#
Constructs a Selu node.
- Parameters:
data – - Node producing the input tensor
alpha – - Alpha coefficient of SELU operation
lambda – - Lambda coefficient of SELU 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.
-
Selu(const Output<Node> &data, const Output<Node> &alpha, const Output<Node> &lambda)#
-
class ShapeOf : public ov::op::util::ShapeOfBase#
- #include <shape_of.hpp>
Operation that returns the shape of its input argument as a tensor.
Public Functions
-
ShapeOf(const Output<Node> &arg, const element::Type output_type = element::i64)#
Constructs a shape-of 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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
ShapeOf(const Output<Node> &arg, const element::Type output_type = element::i64)#
-
class ShapeOf : public ov::op::util::ShapeOfBase#
- #include <shape_of.hpp>
Operation that returns the shape of its input argument as a tensor.
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.
-
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#
-
class ShuffleChannels : public ov::op::Op#
- #include <shuffle_channels.hpp>
Permutes data in the channel dimension of the input.
Public Functions
-
ShuffleChannels(const Output<Node> &data, const int64_t axis = 1, const int64_t group = 1)#
Constructs a ShuffleChannels node.
- Parameters:
data – Node producing the input tensor.
axis – Channel dimension index in the data tensor. A negative value means that the index should be calculated from the back of the input data shape.
group – Number of group the channel dimension should be split into.
-
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.
-
ShuffleChannels(const Output<Node> &data, const int64_t axis = 1, const int64_t group = 1)#
-
class Sigmoid : public ov::op::util::UnaryElementwiseArithmetic#
- #include <sigmoid.hpp>
Sigmoid operation.
Public Functions
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
virtual bool has_evaluate() const override#
-
class Sign : public ov::op::util::UnaryElementwiseArithmetic#
- #include <sign.hpp>
Elementwise sign operation.
-
class Sin : public ov::op::util::UnaryElementwiseArithmetic#
- #include <sin.hpp>
Elementwise sine operation.
Inputs
Type
Description
arg
\(N[d_1,\dots,d_n]~(n \geq 0)\)
A tensor of any shape and numeric element type.
Type
Description
\(N[d_1,\dots,d_n]\)
The tensor \(T\), where \(T[i_1,\dots,i_n] = \sin(\texttt{arg}[i_1,\dots,i_n])\)
-
class Sinh : public ov::op::util::UnaryElementwiseArithmetic#
- #include <sinh.hpp>
Elementwise hyperbolic sine (sinh) operation.
-
class Sink : public ov::op::Op#
- #include <sink.hpp>
Root of nodes that can be sink nodes.
Subclassed by ov::op::util::AssignBase, ov::op::util::MultiSubGraphOp
-
class Slice : public ov::op::Op#
- #include <slice.hpp>
Slice operation.
Public Functions
-
Slice(const Output<Node> &data, const Output<Node> &start, const Output<Node> &stop, const Output<Node> &step)#
Constructs Slice operation (default axes).
- Parameters:
data – The tensor to be sliced.
start – 1D tensor with start indices of the slice.
stop – 1D tensor with end indices of the slice.
step – 1D tensor specifies the increment to use in slicing along corresponding axes.
-
Slice(const Output<Node> &data, const Output<Node> &start, const Output<Node> &stop, const Output<Node> &step, const Output<Node> &axes)#
Constructs Slice operation.
- Parameters:
data – The tensor to be sliced.
start – 1D tensor with start indices of the slice.
stop – 1D tensor with end indices of the slice.
step – 1D tensor specifies the increment to use in slicing along corresponding axes.
axes – 1D tensor indicating which dimensions the values in the
start
andstop
apply to.
-
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.
-
Slice(const Output<Node> &data, const Output<Node> &start, const Output<Node> &stop, const Output<Node> &step)#
-
class SliceScatter : public ov::op::Op#
- #include <slice_scatter.hpp>
SliceScatter operation.
Public Functions
-
SliceScatter(const Output<Node> &data, const Output<Node> &updates, const Output<Node> &start, const Output<Node> &stop, const Output<Node> &step)#
Constructs SliceScatter operation (default axes).
- Parameters:
data – The tensor to be updated.
updates – Tensor containing update values.
start – 1D tensor with start indices of the update slice.
stop – 1D tensor with end indices of the update slice.
step – 1D tensor specifies the increment to use in slicing along corresponding axes.
-
SliceScatter(const Output<Node> &data, const Output<Node> &updates, const Output<Node> &start, const Output<Node> &stop, const Output<Node> &step, const Output<Node> &axes)#
Constructs SliceScatter operation.
- Parameters:
data – The tensor to be updated.
updates – Tensor containing update values.
start – 1D tensor with start indices of the update slice.
stop – 1D tensor with end indices of the update slice.
step – 1D tensor specifies the increment to use in slicing along corresponding axes.
axes – 1D tensor indicating which dimensions the values in the
start
andstop
apply to.
-
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.
-
SliceScatter(const Output<Node> &data, const Output<Node> &updates, const Output<Node> &start, const Output<Node> &stop, const Output<Node> &step)#
-
class Softmax : public ov::op::Op#
- #include <softmax.hpp>
Softmax operation.
Public Functions
-
Softmax(const Output<Node> &arg, const size_t axis = 1)#
Constructs a softmax operation.
Output
[d0, ...]
- Parameters:
arg – Node that produces the first input tensor.
[d0, ...]
axis – The axis position (0-based) on which to calculate the softmax.
-
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.
-
Softmax(const Output<Node> &arg, const size_t axis = 1)#
-
class Softmax : public ov::op::Op#
- #include <softmax.hpp>
Softmax operation with negative axis values.
Public Functions
-
Softmax(const Output<Node> &arg, const int64_t axis = 1)#
Constructs a softmax operation.
Output
[d0, ...]
- Parameters:
arg – Node that produces the first input tensor.
[d0, ...]
axis – The axis position (0-based) in range [-rank(arg), rank(arg) - 1] on which to calculate the softmax.
-
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.
-
Softmax(const Output<Node> &arg, const int64_t axis = 1)#
-
class SoftPlus : public ov::op::util::UnaryElementwiseArithmetic#
- #include <softplus.hpp>
A Self Regularized Non-Monotonic Neural Activation Function f(x) = ln(exp(x) + 1.)
Public Functions
-
SoftPlus(const Output<Node> &arg)#
Constructs an SoftPlus operation.
- Parameters:
data – 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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
SoftPlus(const Output<Node> &arg)#
-
class SpaceToBatch : public ov::op::Op#
- #include <space_to_batch.hpp>
SpaceToBatch permutes data tensor blocks of spatial data into batch dimension.
Note
Values from spatial blocks dimensions are moved in the batch dimension.
Output node produces a tensor with shape: tensor with shape `[batch * block_shape[0] * block_shape[1] * ... * block_shape[N - 1], (pads_begin[1] + D_1 + pads_end[1]) / block_shape[1], (pads_begin[2] + D_2 + pads_end[2]) / block_shape[2], ..., (pads_begin[N - 1] + D_{N - 1} + pads_end[N - 1]) / block_shape[N - 1]` of the same type as `data` input.
Public Functions
-
SpaceToBatch(const Output<Node> &data, const Output<Node> &block_shape, const Output<ov::Node> &pads_begin, const Output<ov::Node> &pads_end)#
Constructs a SpaceToBatch operation.
- Parameters:
data – Node producing the data tensor
block_shape – The sizes of the block of values to be moved
pads_begin – Specifies the padding for the beginning along each axis of
data
inputpads_end – Specifies the padding for the ending along each axis of
data
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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
SpaceToBatch(const Output<Node> &data, const Output<Node> &block_shape, const Output<ov::Node> &pads_begin, const Output<ov::Node> &pads_end)#
-
class SpaceToDepth : public ov::op::Op#
- #include <space_to_depth.hpp>
SpaceToDepth permutes input tensor blocks of spatial data into depth dimension.
Note
Values from the height and width dimensions are moved to the depth dimension.
Output node produces a tensor with shape: [N, C * blocksize * blocksize, H / blocksize, W / blocksize]
Public Functions
-
SpaceToDepth(const Output<Node> &data, const SpaceToDepthMode &mode, std::size_t block_size = 1)#
Constructs a SpaceToDepth operation.
- Parameters:
data – - Node producing the input tensor
mode – Specifies how the output depth dimension is gathered from block coordinates and the old depth dimension.
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.
-
SpaceToDepth(const Output<Node> &data, const SpaceToDepthMode &mode, std::size_t block_size = 1)#
-
class Split : public ov::op::Op#
- #include <split.hpp>
Splits the input tensor into a list of equal sized tensors.
Public Functions
-
Split() = default#
Constructs a split operation.
-
Split(const Output<Node> &data, const Output<Node> &axis, const size_t num_splits)#
Constructs a split operation.
- Parameters:
data – The tensor to be split.
axis – The index of an axis in “data” along which to perform the split.
num_splits – The number of pieces that the data tensor should be split into.
-
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.
-
Split() = default#
-
class Sqrt : public ov::op::util::UnaryElementwiseArithmetic#
- #include <sqrt.hpp>
Elementwise square root operation.
Inputs
Type
Description
arg
\(N[d_1,\dots,d_n]~(n \geq 0)\)
A tensor of any shape and numeric element type.
Type
Description
\(N[d_1,\dots,d_n]\)
The tensor \(T\), where \(T[i_1,\dots,i_n] = \sqrt{\texttt{arg}[i_1,\dots,i_n]}\)
-
class SquaredDifference : public ov::op::util::BinaryElementwiseArithmetic#
- #include <squared_difference.hpp>
Calculates an element-wise squared difference between two tensors.
y[i] = (x1[i] - x2[i])^2
Public Functions
-
inline SquaredDifference()#
Constrcuts an uninitialized squared difference operation.
-
SquaredDifference(const Output<Node> &x1, const Output<Node> &x2, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs the squared difference operation.
- Parameters:
x1 – First input tensor
x2 – 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.
-
inline SquaredDifference()#
-
class Squeeze : public ov::op::util::SqueezeBase#
- #include <squeeze.hpp>
Squeeze operation.
Public Functions
-
Squeeze(const Output<Node> &data)#
Constructs a squeeze v0 operation.
- Parameters:
data – Input tensor with data
-
Squeeze(const Output<Node> &data, const Output<Node> &axes)#
Constructs a squeeze v0 operation.
- Parameters:
data – Input tensor with data
axis – The axis along which to squeeze 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.
-
Squeeze(const Output<Node> &data)#
-
class Squeeze : public ov::op::util::SqueezeBase#
- #include <squeeze.hpp>
Squeeze operation.
Public Functions
-
Squeeze(const Output<Node> &data, const bool allow_axis_skip = false)#
Constructs a squeeze v15 operation.
-
Squeeze(const Output<Node> &data, const Output<Node> &axes, const bool allow_axis_skip = false)#
Constructs a squeeze v15 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.
-
Squeeze(const Output<Node> &data, const bool allow_axis_skip = false)#
-
class STFT : public ov::op::Op#
- #include <stft.hpp>
An operation STFT that computes the Short Time Fourier Transform.
Public Functions
-
STFT(const Output<Node> &data, const Output<Node> &window, const Output<Node> &frame_size, const Output<Node> &frame_step, const bool transpose_frames)#
Constructs a STFT operation.
- Parameters:
data – Input data
window – Window to perform STFT
frame_size – Scalar value representing the size of Fourier Transform
frame_step – The distance (number of samples) between successive window frames
transpose_frames – Flag to set output shape layout. If true the
frames
dimension is at out_shape[2], otherwise it is at out_shape[1].
-
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.
-
STFT(const Output<Node> &data, const Output<Node> &window, const Output<Node> &frame_size, const Output<Node> &frame_step, const bool transpose_frames)#
-
class StridedSlice : public ov::op::Op#
- #include <strided_slice.hpp>
Takes a slice of an input tensor, i.e., the sub-tensor that resides within a bounding box, optionally with stride.
Public Functions
-
StridedSlice(const Output<Node> &data, const Output<Node> &begin, const Output<Node> &end, const Output<Node> &strides, const std::vector<int64_t> &begin_mask, const std::vector<int64_t> &end_mask, const std::vector<int64_t> &new_axis_mask = std::vector<int64_t>{}, const std::vector<int64_t> &shrink_axis_mask = std::vector<int64_t>{}, const std::vector<int64_t> &ellipsis_mask = std::vector<int64_t>{})#
Constructs a dynamic tensor strided slice operation.
- Parameters:
data – The tensor to be sliced.
begin – 1D tensor with begin indexes for input blob slicing.
end – 1D tensor with end indexes for input blob slicing.
strides – The slicing strides; for example, strides of
{n,m}
means to take every nth row and every mth column of the input matrix.begin_mask – When begin_mask[i] equal to 1 means that the corresponding dimension of the begin input is ignored.
end_mask – When end_mask[i] is 1, the corresponding dimension of the end input is ignored.
new_axis_mask – If new_axis_mask[i] is 1, a length 1 dimension is inserted on the i-th position.
shrink_axis_mask – If shrink_axis_mask[i] is 1, the dimension on the i-th position is deleted.
ellipsis_mask – It inserts missing dimensions on a position of a non-zero bit.
-
StridedSlice(const Output<Node> &data, const Output<Node> &begin, const Output<Node> &end, const std::vector<int64_t> &begin_mask, const std::vector<int64_t> &end_mask, const std::vector<int64_t> &new_axis_mask = std::vector<int64_t>{}, const std::vector<int64_t> &shrink_axis_mask = std::vector<int64_t>{}, const std::vector<int64_t> &ellipsis_mask = std::vector<int64_t>{})#
Constructs a dynamic tensor strided slice operation.
- Parameters:
data – The tensor to be sliced.
begin – 1D tensor with begin indexes for input blob slicing.
end – 1D tensor with end indexes for input blob slicing.
begin_mask – When begin_mask[i] equal to 1 means that the corresponding dimension of the begin input is ignored.
end_mask – When end_mask[i] is 1, the corresponding dimension of the end input is ignored.
new_axis_mask – If new_axis_mask[i] is 1, a length 1 dimension is inserted on the i-th position.
shrink_axis_mask – If shrink_axis_mask[i] is 1, the dimension on the i-th position is deleted.
ellipsis_mask – It inserts missing dimensions on a position of a non-zero bit.
-
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.
-
StridedSlice(const Output<Node> &data, const Output<Node> &begin, const Output<Node> &end, const Output<Node> &strides, const std::vector<int64_t> &begin_mask, const std::vector<int64_t> &end_mask, const std::vector<int64_t> &new_axis_mask = std::vector<int64_t>{}, const std::vector<int64_t> &shrink_axis_mask = std::vector<int64_t>{}, const std::vector<int64_t> &ellipsis_mask = std::vector<int64_t>{})#
-
class StringTensorPack : public ov::op::Op#
- #include <string_tensor_pack.hpp>
Operator packing a concatenated batch of strings into a batched string tensor.
Public Functions
-
StringTensorPack(const Output<Node> &begins, const Output<Node> &ends, const Output<Node> &symbols)#
Constructs a StringTensorPack operation.
- Parameters:
begins – Indices of each string’s beginnings
ends – Indices of each string’s endings
symbols – Concatenated input strings encoded in utf-8 bytes
-
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.
-
StringTensorPack(const Output<Node> &begins, const Output<Node> &ends, const Output<Node> &symbols)#
-
class StringTensorUnpack : public ov::op::Op#
- #include <string_tensor_unpack.hpp>
Operator unpacking a batch of strings into three tensors.
Public Functions
-
StringTensorUnpack(const Output<Node> &data)#
Constructs a StringTensorUnpack operation.
- Parameters:
data – Input of type element::string
-
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.
-
StringTensorUnpack(const Output<Node> &data)#
-
class Subtract : public ov::op::util::BinaryElementwiseArithmetic#
- #include <subtract.hpp>
Elementwise subtraction operation.
Public Functions
-
Subtract(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
Constructs a subtraction operation.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Subtract(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec(AutoBroadcastType::NUMPY))#
-
class Swish : public ov::op::Op#
- #include <swish.hpp>
A Swish Activation Function f(x) = x / (1.0 + exp(-beta * x)) or f(x) = x * sigmoid(beta * x)
Public Functions
-
Swish(const Output<Node> &arg, const Output<Node> &beta)#
Constructs an Swish operation.
- Parameters:
data – Input tensor
beta – Scalar with beta value. If the argument is not specified then use the default value 1.0
-
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.
-
Swish(const Output<Node> &arg, const Output<Node> &beta)#
-
class Tan : public ov::op::util::UnaryElementwiseArithmetic#
- #include <tan.hpp>
Elementwise tangent operation.
Inputs
Type
Description
arg
\(N[d_1,\dots,d_n]~(n \geq 0)\)
A tensor of any shape and numeric element type.
Type
Description
\(N[d_1,\dots,d_n]\)
The tensor \(T\), where \(T[i_1,\dots,i_n] = \tan(\texttt{arg}[i_1,\dots,i_n])\)
-
class Tanh : public ov::op::util::UnaryElementwiseArithmetic#
- #include <tanh.hpp>
Elementwise hyperbolic tangent operation.
-
class TensorIterator : public ov::op::util::SubGraphOp#
- #include <tensor_iterator.hpp>
Iterate a body over tensors, accumulating into tensors.
Public Functions
- Parameters:
body – set the body of the iteration
-
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 Tile : public ov::op::Op#
- #include <tile.hpp>
Dynamic Tiling operation which repeats a tensor multiple times along each dimension.
Public Functions
-
Tile(const Output<Node> &data, const Output<Node> &repeats)#
Perform dynamic padding of a tensor.
- Parameters:
data – The node producing input tensor to be padded.
repeats – The node producing the per-dimension replication factor
-
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.
-
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
-
Tile(const Output<Node> &data, const Output<Node> &repeats)#
-
class TopK : public ov::op::util::TopKBase#
- #include <topk.hpp>
Computes indices and values of the k maximum/minimum values for each slice along specified axis.
Public Functions
-
TopK(const Output<Node> &data, const Output<Node> &k, const int64_t axis, const std::string &mode, const std::string &sort, const element::Type &index_element_type = element::i32)#
Constructs a TopK operation with two outputs: values and indices. By default the indices output is described by i32 data type.
- Parameters:
data – The input tensor
k – Specifies how many maximum/minimum elements should be computed (note: scalar input tensor)
axis – The axis along which to compute top k indices
mode – Specifies which operation (min or max) is used to select the biggest element of two.
sort – Specifies order of output elements and/or indices Accepted values: none, index, value
index_element_type – Specifies type of produced indices
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
TopK(const Output<Node> &data, const Output<Node> &k, const int64_t axis, const std::string &mode, const std::string &sort, const element::Type &index_element_type = element::i32)#
-
class TopK : public ov::op::util::TopKBase#
- #include <topk.hpp>
Computes indices and values of the k maximum/minimum values for each slice along specified axis.
Public Functions
-
TopK(const Output<Node> &data, const Output<Node> &k, const int64_t axis, const std::string &mode, const std::string &sort, const element::Type &index_element_type = element::i32)#
Constructs a TopK operation with two outputs: values and indices. By default the indices output is described by i32 data type.
- Parameters:
data – The input tensor
k – Specifies how many maximum/minimum elements should be computed (note: scalar input tensor)
axis – The axis along which to compute top k indices
mode – Specifies which operation (min or max) is used to select the biggest element of two.
sort – Specifies order of output elements and/or indices Accepted values: none, index, value
index_element_type – Specifies type of produced indices
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
TopK(const Output<Node> &data, const Output<Node> &k, const int64_t axis, const std::string &mode, const std::string &sort, const element::Type &index_element_type = element::i32)#
-
class TopK : public ov::op::util::TopKBase#
- #include <topk.hpp>
Computes the top K elements of a given tensor along the specified axis.
Public Functions
-
TopK(const Output<Node> &data, const Output<Node> &k, const int64_t axis, const std::string &mode, const std::string &sort, const element::Type &index_element_type = element::i32, const bool stable = false)#
Constructs a TopK operation with two outputs: values and indices.
- Parameters:
data – The input tensor
k – Specifies how many maximum/minimum elements should be computed
axis – The axis along which the TopK operation should be executed
mode – Specifies whether TopK selects the largest or the smallest elements from each slice
sort – Specifies the order of corresponding elements of the output tensor
index_element_type – Specifies the data type of the elements in the ‘indices’ output tensor.
stable – Specifies whether the equivalent elements should maintain their relative order from the input tensor during sorting.
-
TopK(const Output<Node> &data, const Output<Node> &k, const int64_t axis, const TopKMode mode, const TopKSortType sort, const element::Type &index_element_type = element::i32, const bool stable = false)#
Constructs a TopK operation with two outputs: values and indices.
- Parameters:
data – The input tensor
k – Specifies how many maximum/minimum elements should be computed
axis – The axis along which the TopK operation should be executed
mode – Specifies whether TopK selects the largest or the smallest elements from each slice
sort – Specifies the order of corresponding elements of the output tensor
index_element_type – Specifies the data type of the elements in the ‘indices’ output tensor.
stable – Specifies whether the equivalent elements should maintain their relative order from the input tensor during sorting.
-
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.
-
TopK(const Output<Node> &data, const Output<Node> &k, const int64_t axis, const std::string &mode, const std::string &sort, const element::Type &index_element_type = element::i32, const bool stable = false)#
-
class Transpose : public ov::op::Op#
- #include <transpose.hpp>
Tensor transpose operation.
Public Types
Public Functions
-
Transpose(const Output<Node> &arg, const Output<Node> &input_order)#
Constructs a transpose 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.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Transpose(const Output<Node> &arg, const Output<Node> &input_order)#
-
class Unique : public ov::op::Op#
- #include <unique.hpp>
Operator which selects and returns unique elements or unique slices of the input tensor.
Public Functions
-
Unique(const Output<Node> &data, const bool sorted = true, const element::Type &index_element_type = element::i64, const element::Type &count_element_type = element::i64)#
Constructs a Unique operation.
- Parameters:
data – Input data tensor
sorted – Controls the order of the returned unique values (sorts ascendingly when true)
index_element_type – The data type for outputs containing indices
count_element_type – The data type for output containing repetition count
-
Unique(const Output<Node> &data, const Output<Node> &axis, const bool sorted = true, const element::Type &index_element_type = element::i64, const element::Type &count_element_type = element::i64)#
Constructs a Unique operation.
- Parameters:
data – Input data tensor
axis – An input tensor containing the axis value
sorted – Controls the order of the returned unique values (sorts ascendingly when true)
index_element_type – The data type for outputs containing indices
count_element_type – The data type for output containing repetition count
-
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.
-
Unique(const Output<Node> &data, const bool sorted = true, const element::Type &index_element_type = element::i64, const element::Type &count_element_type = element::i64)#
-
class Unsqueeze : public ov::op::Op#
- #include <unsqueeze.hpp>
Unsqueeze 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.
-
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.
-
virtual void validate_and_infer_types() override#
-
class SqueezeBase : public ov::op::Op#
- #include <squeeze_base.hpp>
Squeeze operation.
Subclassed by ov::op::v0::Squeeze, ov::op::v15::Squeeze
Public Functions
-
SqueezeBase(const Output<Node> &data)#
Constructs a squeeze operation.
- Parameters:
data – Input tensor with data
-
SqueezeBase(const Output<Node> &data, const Output<Node> &axes)#
Constructs a squeeze operation.
- Parameters:
data – Input tensor with data
axis – The axis along which to squeeze the input tensor.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
SqueezeBase(const Output<Node> &data)#
-
class VariadicSplit : public ov::op::Op#
- #include <variadic_split.hpp>
VariadicSplit operation splits an input tensor into pieces along some axis. The pieces may have variadic lengths depending on “split_lengths” attribute.
Public Functions
-
VariadicSplit() = default#
Constructs a variadic split operation.
-
VariadicSplit(const Output<Node> &data, const Output<Node> &axis, const Output<Node> &split_lengths)#
Constructs a variadic split operation.
outputs. The sum of split_lengths must match data.shape[axis]
- Parameters:
data – The tensor to be split.
axis – The index of an axis in “data” along which to perform the split.
split_lengths – A list containing the sizes of each output tensor along the split “axis”. Size of “split_lengths” should be equal to the number of
-
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 size_t get_default_output_index() const override#
Returns the output of the default output, or throws if there is none.
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
VariadicSplit() = default#
-
class Xor : public ov::op::util::BinaryElementwiseLogical#
- #include <xor.hpp>
Elementwise logical-xor operation.
Public Functions
-
Xor(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec())#
Constructs a logical-xor operation.
Output
[d0, ...]
-
virtual bool has_evaluate() const override#
Allows to get information about availability of evaluate method for the current operation.
-
Xor(const Output<Node> &arg0, const Output<Node> &arg1, const AutoBroadcastSpec &auto_broadcast = AutoBroadcastSpec())#
-
class AUGRUCell : public ov::op::util::RNNCellBase#