ngraph.opset6.topk

ngraph.opset6.topk(data: Union[_pyngraph.Node, int, float, numpy.ndarray], k: Union[_pyngraph.Node, int, float, numpy.ndarray], axis: int, mode: str, sort: str, index_element_type: str = 'i32', name: Optional[str] = None) _pyngraph.Node

Return a node which performs TopK.

Parameters
  • data – Input data.

  • k

  • axis – TopK Axis.

  • mode – Compute TopK largest (‘max’) or smallest (‘min’)

  • sort – Order of output elements (sort by: ‘none’, ‘index’ or ‘value’)

  • index_element_type – Type of output tensor with indices.

Returns

The new node which performs TopK (both indices and values)