mindspore.Tensor.strides
- property Tensor.strides
Return the tuple of bytes to step in each dimension when traversing a tensor.
Examples
>>> from mindspore import Tensor >>> import numpy as np >>> x = Tensor(np.array([[1, 2], [3, 4]])) >>> output = x.strides >>> print(output) (16, 8)