目录

SetStorageFormat

Function Description

Sets the storage format of a tensor.

Function Prototype

void SetStorageFormat(const ge::Format storage_format)

Parameters

Parameter Input/Output Description
storage_format Input

Storage format.

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

Return Value

None

Restrictions

None

Calling Example

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