GetStorageShape

函数功能

获取运行时Tensor的shape,此shape对象为只读。

函数原型

const Shape &GetStorageShape() const

参数说明

无。

返回值说明

只读的运行时shape引用。

约束说明

无。

调用示例

StorageShape sh({1, 2, 3}, {2, 1, 3});
Tensor t = {sh, {}, {}, ge::DT_FLOAT, nullptr};
auto shape = t.GetStorageShape(); // 2,1,3