mindspore.Tensor.view ===================== .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindspore/blob/master/docs/api/api_python/mindspore/Tensor/mindspore.Tensor.view.rst :alt: 查看源文件 .. py:method:: mindspore.Tensor.view(*shape) 根据输入shape重新创建一个Tensor,与原Tensor数据相同。该方法与reshape方法相同,都是依靠底层reshape算子实现的。 参数: - **shape** (Union[tuple(int), int]) - 输出Tensor的维度。 返回: Tensor,具有与入参 `shape` 相同的维度。