mindspore.Tensor.dtype
- property Tensor.dtype
Return the dtype of the tensor (
mindspore.dtype
).Examples
>>> from mindspore import Tensor >>> import numpy as np >>> x = Tensor(np.array([1, 2], dtype=np.float32)) >>> print(x.dtype) Float32
Return the dtype of the tensor (mindspore.dtype
).
Examples
>>> from mindspore import Tensor
>>> import numpy as np
>>> x = Tensor(np.array([1, 2], dtype=np.float32))
>>> print(x.dtype)
Float32