MutableStorageShape

Function Usage

Obtains the storage shape of a tensor. The shape object is mutable.

Prototype

1
Shape &MutableStorageShape()

Parameters

None

Returns

Reference to the shape at runtime.

Constraints

None

Examples

1
2
3
StorageShape sh({1, 2, 3}, {2, 1, 3});
TensorV2 t = {sh, {ge::FORMAT_ND, ge::FORMAT_FRACTAL_NZ, {}}, kOnHost, ge::DT_FLOAT, nullptr};
auto shape = t.MutableStorageShape(); // 2,1,3