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

29 lines
708 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.mint.argmax
=====================
.. py:function:: mindspore.mint.argmax(input) -> Tensor
返回tensor的最大值索引。
参数:
- **input** (Tensor) - 输入tensor。
返回:
Tensor。
.. py:function:: mindspore.mint.argmax(input, dim, keepdim=False) -> Tensor
:noindex:
返回tensor在指定维度上的最大值索引。
参数:
- **input** (Tensor) - 输入tensor。
- **dim** (int) - 指定维度。
- **keepdim** (bool可选) - 是否保留输出tensor的维度。默认 ``False``
返回:
Tensor
异常:
- **ValueError** - 如果 `dim` 的设定值超出了范围。