返回输入tensor的shape。
input_x (Tensor) - 输入tensor。
tuple[int]
Ascend GPU CPU
Ascend
GPU
CPU
样例:
>>> import mindspore >>> input_x = mindspore.ops.ones(shape=[3, 2, 1]) >>> output = mindspore.ops.shape(input_x) >>> print(output) (3, 2, 1)