TopK
Description
Returns the k maximum or minimum values of a specified axis.
Input
Output
Two outputs:
Values: return value of topk.
Indices: index of the top K return value.
Attribute
axis: int. Defaults to -1.
largest: int. Defaults to 1, indicating that k maximum/minimum values are returned.
sorted: int. Whether to sort in ascending order. Defaults to 1.
ONNX Opset Support
Opset v8/v9/v10/v11/v12/v13/v14/v15/v16/v17/v18
Parent topic: Operators Specifications of the AI Framework