openvino.runtime.opset11.topk¶
- openvino.runtime.opset11.topk(data: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], k: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], axis: int, mode: str, sort: str, index_element_type: str = 'i32', stable: bool = False, name: Optional[str] = None) openvino._pyopenvino.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.
stable – Specifies whether the equivalent elements should maintain their relative order from the input tensor during sorting.
- Returns
The new node which performs TopK