Sets the data type of a tensor.
void SetDataType(const ge::DataType data_type)
Data type of a tensor to be set.
For details about the definition of ge::DataType, see DataType.
None
StorageShape sh({1, 2, 3}, {1, 2, 3}); Tensor t = {sh, {}, {}, ge::DT_FLOAT, nullptr}; t.SetDataType(ge::DT_DOUBLE);