SetExpandDimsType
Function Usage
Sets the dimension expansion rule for converting the original format to the runtime format.
Prototype
1 | void SetExpandDimsType(const ExpandDimsType &expand_dims_type) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
expand_dims_type |
Input |
Dimension expansion rule to be set. For details about ExpandDimsType, see ExpandDimsType. |
Returns
None
Constraints
None
Examples
1 2 3 4 5 6 7 8 9 10 11 12 | auto dtype_ = ge::DataType::DT_INT32; StorageFormat fmt_(ge::Format::FORMAT_NC, ge::FORMAT_NCHW, {}); ExpandDimsType type_("1001"); gert::CompileTimeTensorDesc td; td.SetDataType(dtype_); auto dtype = td.GetDataType(); // ge::DataType::DT_INT32; td.SetStorageFormat(fmt_.GetStorageFormat()); auto storage_fmt = td.GetStorageFormat(); // ge::FORMAT_NCHW td.SetOriginFormat(fmt_.GetOriginFormat()); auto origin_fmt = td.GetOriginFormat(); // ge::Format::FORMAT_NC td.SetExpandDimsType(type_); auto type = td.GetExpandDimsType(); // type_("1001") |
Parent topic: CompileTimeTensorDesc