SetStorageFormat
Function Usage
Obtains the data format of a tensor at runtime.
Prototype
1 | void SetStorageFormat(const ge::Format storage_format) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
storage_format |
Input |
Data format at runtime. For details about the definition of the ge::Format type, see Format. |
Returns
None
Constraints
None
Examples
1 2 3 4 5 | StorageShape sh({1, 2, 3}, {1, 2, 3}); TensorV2 t = {sh, {ge::FORMAT_ND, ge::FORMAT_FRACTAL_NZ, {}}, kOnHost, ge::DT_FLOAT, nullptr}; t.SetOriginFormat(ge::FORMAT_NHWC); t.SetStorageFormat(ge::FORMAT_NC1HWC0); auto fmt = t.GetStorageFormat(); // ge::FORMAT_NC1HWC0 |
Parent topic: TensorV2