GetDataType
函数功能
获取Tensor的数据类型。
函数原型
ge::DataType GetDataType() const
参数说明
无。
约束说明
无。
调用示例
StorageShape sh({1, 2, 3}, {1, 2, 3});
Tensor t = {sh, {}, {}, ge::DT_FLOAT, nullptr};
auto dt = t.GetDataType(); // ge::DT_FLOAT
父主题: Tensor类
获取Tensor的数据类型。
ge::DataType GetDataType() const
无。
无。
StorageShape sh({1, 2, 3}, {1, 2, 3});
Tensor t = {sh, {}, {}, ge::DT_FLOAT, nullptr};
auto dt = t.GetDataType(); // ge::DT_FLOAT