Class ov::op::v3::NonZero¶
-
class NonZero : public ov::op::Op¶
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)¶