目录

GetStorageFormat

Function Description

Obtains the storage format of a tensor.

Function Prototype

ge::Format GetStorageFormat() const

Parameters

None

Return Value

Storage format.

For details about the definition of ge::Format, see Format.

Restrictions

None

Calling Example

Tensor t = {{}, {}, {}, {}, nullptr};
t.SetOriginFormat(ge::FORMAT_NHWC);
t.SetStorageFormat(ge::FORMAT_NC1HWC0);
auto fmt = t.GetStorageFormat(); // ge::FORMAT_NC1HWC0