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

18 lines
576 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.permute
=====================
.. py:function:: mindspore.ops.permute(x, dims)
按照输入 `dims` 的维度顺序排列输入Tensor。
参数:
- **x** (Tensor) - 输入Tensor。
- **dims** (Union[tuple(int), list(int), int]) - 维度的顺序permute根据 `dims` 的顺序重新排列 `x`
返回:
Tensor具有和输入Tensor相同的维数按照 `dims` 重新排列。
异常:
- **ValueError** - `dims` 为None。
- **ValueError** - `dims` 的元素总量不等于 `x` 的维数。