megengine.functional.argmax¶
- argmax(inp, axis=None, keepdims=False)[source]¶
Returns the indices of the maximum values along given axis. If axis is a list of dimensions, reduce over all of them.
- Parameters
- Return type
- Returns
output tensor.
Examples
>>> import numpy as np >>> x = Tensor(np.arange(1, 7, dtype=np.int32).reshape(2,3)) >>> F.argmax(x) Tensor(5, dtype=int32, device=xpux:0)