Class ov::op::v1::OneHot¶
-
class OneHot : public ov::op::Op¶
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¶