SetOriginFormat
Function Usage
Sets the original data format of a tensor.
Prototype
1 | void SetOriginFormat(const ge::Format origin_format) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
origin_format |
Input |
Original data format. 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.GetOriginFormat(); // ge::FORMAT_NHWC |
Parent topic: TensorV2