SetDataType
Function Usage
Sets the data type of a tensor.
Prototype
1 | void SetDataType(const ge::DataType data_type) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
data_type |
Input |
Data type of a tensor to be set. For details about the definition of ge::DataType, see DataType. |
Returns
None
Constraints
None
Examples
1 2 3 | StorageShape sh({1, 2, 3}, {1, 2, 3}); TensorV2 t = {sh, {ge::FORMAT_ND, ge::FORMAT_FRACTAL_NZ, {}}, kOnHost, ge::DT_FLOAT, nullptr}; t.SetDataType(ge::DT_DOUBLE); |
Parent topic: TensorV2