mindspore.Tensor.strides

property mindspore.Tensor.strides

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

样例:

>>> from mindspore import Tensor
>>> import numpy as np
>>> x = Tensor(np.array([[1, 2], [3, 4]]))
>>> output = x.strides
>>> print(output)
(16, 8)