mindspore.Tensor.shape
- property mindspore.Tensor.shape
详情请参考
mindspore.ops.shape()
。样例:
>>> from mindspore import Tensor >>> import numpy as np >>> x = Tensor(np.array([[1, 2], [3, 4]])) >>> print(x.shape) (2, 2)
详情请参考 mindspore.ops.shape()
。
样例:
>>> from mindspore import Tensor
>>> import numpy as np
>>> x = Tensor(np.array([[1, 2], [3, 4]]))
>>> print(x.shape)
(2, 2)