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
>>> 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)