MutableOriginShape

Description

Obtains the original shape of a tensor.

Prototype

Shape &MutableOriginShape()

Parameters

None

Returns

Original shape reference.

For details about the definition of the shape type, see Shape.

Restrictions

None

Example

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