mindspore.Tensor.strides
- property Tensor.strides
Return the tuple of bytes to step in each dimension when traversing a tensor.
Warning
This interface is deprecated and will be removed after version 2.9.0.
Examples
>>> from mindspore import Tensor >>> from mindspore import dtype as mstype >>> import numpy as np >>> x = Tensor(np.array([[1, 2], [3, 4]]), dtype=mstype.int64) >>> output = x.strides >>> print(output) (16, 8)