Obtains the shapes of a tensor, including the storage and original shapes.
const StorageShape &GetShape() const StorageShape &GetShape()
None
const StorageShape &GetShape() const: returns a read-only shape reference.
StorageShape &GetShape(): returns a shape reference.
For details about the definition of the StorageShape type, see StorageShape.
StorageShape sh({1, 2, 3}, {2, 1, 3}); Tensor t = {sh, {}, {}, ge::DT_FLOAT, nullptr}; auto shape = t.GetShape(); // sh