Class ov::op::util::UnaryElementwiseArithmetic#

class UnaryElementwiseArithmetic : public ov::op::Op#

Abstract base class for elementwise unary arithmetic operations, i.e., operations where the same scalar arithmetic operation is applied to each element.

For example, if the underlying operation (determined by the subclass) is \(\mathit{op}(x)\), the input tensor \([[x,y],[z,w]]\) will be mapped to \([[\mathit{op}(x),\mathit{op}(y)],[\mathit{op}(z),\mathit{op}(w)]]\).





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

A tensor of any shape. The element type \(N\) may be any numeric type.




The tensor \(T\), where \(T[i_1,\dots,i_n] = \mathit{op}(\texttt{arg}[i_1,\dots,i_n])\). This will always have the same shape and element type as the input tensor.

Subclassed by ov::op::v0::Abs, ov::op::v0::Acos, ov::op::v0::Asin, ov::op::v0::Atan, ov::op::v0::Ceiling, ov::op::v0::Clamp, ov::op::v0::Cos, ov::op::v0::Cosh, ov::op::v0::Elu, ov::op::v0::Erf, ov::op::v0::Exp, ov::op::v0::Floor, ov::op::v0::GRN, ov::op::v0::Gelu, ov::op::v0::Log, ov::op::v0::Negative, ov::op::v0::Relu, ov::op::v0::Sigmoid, ov::op::v0::Sign, ov::op::v0::Sin, ov::op::v0::Sinh, ov::op::v0::Sqrt, ov::op::v0::Tan, ov::op::v0::Tanh, ov::op::v3::Acosh, ov::op::v3::Asinh, ov::op::v3::Atanh, ov::op::v4::HSwish, ov::op::v4::Mish, ov::op::v4::SoftPlus, ov::op::v5::HSigmoid, ov::op::v5::Round, ov::op::v7::Gelu, ov::op::v9::SoftSign

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.