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

14 lines
512 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.roll
===================
.. py:function:: mindspore.ops.roll(input, shifts, dims=None)
按维度移动tensor的元素。
参数:
- **input** (Tensor) - 输入tensor。
- **shifts** (Union[list(int), tuple(int), int]) - 元素移动量。
- **dims** (Union[list(int), tuple(int), int], 可选) - 指定移动维度,默认 ``None`` 表示将输入tensor展平后再进行计算然后将计算结果reshape为输入的shape。
返回:
Tensor