ArgMax

Description

Returns the index corresponding to the maximum value on the specified axis of the input tensor.

Input

data: tensor of type float16, float, or int32. The data format can be ND.

Attribute

  • axis: int32, axis in which to compute the arg indices. Accepted range is [–len(x.shape), len(x.shape) – 1].
  • keepdims: The default value is 1. The value can be 1 or 0 (optional).
  • select_last_index: whether to select the first or last position if the maximum value appears in multiple positions. The value range is [0, 1]. The default value is 0. Currently, only value 0 is supported.

Output

reduced: output tensor of type int64, indicating the index position of the maximum value. The number of dimensions is one less than that of the input data. The data type can be ND.

Constraints

None

ONNX Opset Support

Opset v8/v9/v10/v11/v12/v13/v14/v15/v16/v17/v18