mindspore/docs/api/api_python/ops/mindspore.ops.func_argmax.rst

18 lines
716 B
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.argmax
====================
.. py:function:: mindspore.ops.argmax(x, axis=None, keepdims=False)
返回输入Tensor在指定轴上的最大值索引。
参数:
- **x** (Tensor) - 输入Tensor。
- **axis** (Union[int, None],可选) - 指定计算轴。如果是None将会返回扁平化Tensor在指定轴上的最大值索引。默认值None。
- **keepdims** (bool可选) - 输出Tensor是否保留指定轴。如果 `axis` 是None忽略该选项。默认值 False。
返回:
Tensor输出为指定轴上输入Tensor最大值的索引。
异常:
- **ValueError** - 如果入参 `axis` 的设定值超出了范围。