Class ov::op::v3::TopK¶
-
class TopK : public ov::op::util::TopKBase¶
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)¶