mindspore.Tensor.strides

property mindspore.Tensor.strides

Tensor上每个维度跨度的字节元组。

样例:

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