GetDataType接口
接口功能
获取张量对象数据类型。
接口格式
InferDataType GetDataType() const
接口参数
无。
使用样例
std::string name = "INPUT_IDS";
mindie_llm::InferDataType dataType = mindie_llm::InferDataType::TYPE_INT64;
std::vector<int64_t> dataShape = {1, 2};
auto inputsTensor = std::make_shared<mindie_llm::InferTensor>(name, dataType, dataShape);
mindie_llm::InferDataType dataType2 = inputsTensor->GetDataType();
返回值
张量对象数据类型,类型为InferDataType。
父主题: InferTensor