mindspore.Tensor.view_as ======================== .. 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_as.rst :alt: 查看源文件 .. py:method:: mindspore.Tensor.view_as(other) 根据 `other` 的shape改变原Tensor的shape。 参数: - **other** (Tensor) - 返回Tensor的shape与 `other` 的shape一致。 返回: Tensor,和 `other` 具有相同的shape。 异常: - **TypeError** - `other` 不是Tensor。