2.4K Star 8.2K Fork 4.4K

GVPMindSpore / mindspore

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
argmax_doc.yaml 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
chenfei_mindspore 提交于 2024-02-26 16:24 . move doc.yaml to doc dir
argmax:
description: |
Returns the indices of the maximum value along a specified `axis` of a Tensor.
Refer to :func:`mindspore.ops.argmax` for more details.
Args:
axis (int): Axis where the Argmax operation applies to. Default: ``-1`` .
output_type (:class:`mindspore.dtype`): Output data type.
Supported types: ``mstype.int32`` , ``mstype.int64`` . Default: ``mstype.int32`` .
Inputs:
- **input_x** (Tensor) - The input tensor. :math:`(N, *)` where :math:`*` means, any number of additional
dimensions.
Outputs:
Tensor, indices of the max value of input tensor across the axis.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> import mindspore
>>> import numpy as np
>>> from mindspore import Tensor, ops
>>> 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]
Python
1
https://gitee.com/mindspore/mindspore.git
git@gitee.com:mindspore/mindspore.git
mindspore
mindspore
mindspore
master

搜索帮助