mindspore.ops.Argmax

class mindspore.ops.Argmax(axis=- 1, output_type=mstype.int32)[source]

Returns the indices of the maximum value of a tensor across the axis.

Refer to mindspore.ops.argmax() for more details.

Supported Platforms:

Ascend GPU CPU

Examples

>>> input_x = Tensor(np.array([[1, 20, 5], [67, 8, 9], [130, 24, 15]]).astype(np.float32))
>>> output = ops.Argmax(output_type=mindspore.int32)(input_x)
>>> print(output)
[1 0 0]