目录

GetOriginFormat

Function Description

Obtains the original format of a tensor.

Function Prototype

ge::Format GetOriginFormat() const

Parameters

None

Return Value

Original 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.GetOriginFormat(); // ge::FORMAT_NHWC