mindspore.Tensor.size
- property Tensor.size
For details, please refer to
mindspore.ops.size()
.Examples
>>> from mindspore import Tensor >>> import numpy as np >>> x = Tensor(np.array([[1, 2], [3, 4]])) >>> output = x.size >>> print(output) 4
For details, please refer to mindspore.ops.size()
.
Examples
>>> from mindspore import Tensor
>>> import numpy as np
>>> x = Tensor(np.array([[1, 2], [3, 4]]))
>>> output = x.size
>>> print(output)
4