mindspore.Tensor.data
- Tensor.data
Get access to the raw data without tracking its computational history for autograd.
Warning
This is an experimental API that is subject to change or deletion.
- Returns
Tensor, a new tensor that shares the data storage with the original tensor.
Examples
>>> import mindspore as ms >>> tensor = ms.Tensor([1, 2, 3, 4]) >>> print(tensor.data) [1 2 3 4]