mindspore2022/docs/api/api_python/ops/mindspore.ops.ReverseV2.rst

26 lines
689 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.ReverseV2
========================
.. py:class:: mindspore.ops.ReverseV2(axis)
对输入Tensor按指定维度反转。
.. warning::
"axis"的取值范围为[-dims, dims - 1]"dims"表示"input_x"的维度长度。
**参数:**
- **axis** (Union[tuple(int), list(int)) - 指定反转的轴。
**输入:**
- **input_x** (Tensor) - 输入需反转的任意维度的Tensor。数据类型为数值型不包括float64。
**输出:**
Tensorshape和数据类型与输入 `input_x` 相同。
**异常:**
- **TypeError** - `axis` 既不是list也不是tuple。
- **TypeError** - `axis` 的元素不是int。