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

17 lines
451 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.reshape
======================
.. py:function:: mindspore.ops.reshape(input, shape)
按指定 `shape` 对输入tensor进行重排。
.. note::
参数 `shape` 中的-1表示该维度值是从其他维度和输入的元素数量推断出来的。
参数:
- **input** (Tensor) - 输入tensor。
- **shape** (Union[tuple[int], list[int], Tensor[int]]) - 新shape。
返回:
Tensor