Obtains the data type of a tensor.
ge::DataType GetDataType() const
None
Data type of a tensor.
For details about the definition of ge::DataType, see DataType.
StorageShape sh({1, 2, 3}, {1, 2, 3}); Tensor t = {sh, {}, {}, ge::DT_FLOAT, nullptr}; // ge::DT_FLOAT auto dt = t.GetDataType();