You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mindspore.ops.Argmax.rst 995 B

123456789101112131415161718192021222324252627282930
  1. mindspore.ops.Argmax
  2. =====================
  3. .. py:class:: mindspore.ops.Argmax(axis=-1, output_type=mstype.int32)
  4. 返回输入Tensor在指定轴上的最大值索引。
  5. 如果输入Tensor的shape为 :math:`(x_1, ..., x_N)` ,则输出Tensor的shape为 :math:`(x_1, ..., x_{axis-1}, x_{axis+1}, ..., x_N)` 。
  6. **参数:**
  7. - **axis** (int) - 指定Argmax计算轴。默认值:-1。
  8. - **output_type** (:class:`mindspore.dtype`) - 指定输出数据类型。默认值: `mindspore.dtype.int32` 。
  9. **输入:**
  10. - **input_x** (Tensor):Argmax的输入,任意维度的Tensor。支持的数据类型如下所示:
  11. - Ascend:Float16和Float32。
  12. - GPU:Float16和Float32。
  13. - CPU:Float16、Float32和Float64。
  14. **输出:**
  15. Tensor,输出为指定轴上输入Tensor最大值的索引。
  16. **异常:**
  17. - **TypeError** - `axis` 不是int。
  18. - **TypeError** - `output_type` 既不是int32也不是int64。