Class ov::op::v10::Unique

class Unique : public ov::op::Op

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
  • dataInput 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
  • dataInput 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.