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

27 lines
600 B
ReStructuredText
Raw 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.ReduceOp
======================
.. py:class:: mindspore.ops.ReduceOp
规约张量的操作选项。这是枚举类型,而不是运算符。
主要调用方法如下:
- SUMReduceOp.SUM.
- MAXReduceOp.MAX.
- MINReduceOp.MIN.
- PRODReduceOp.PROD.
有四种操作选项,"SUM"、"MAX"、"MIN"和"PROD"。
- SUM求和。
- MAX求最大值。
- MIN求最小值。
- PROD求乘积。
样例:
.. note::
.. include:: mindspore.ops.comm_note.rst
该样例需要在多卡环境下运行。