ImmutableInputs接口
接口功能
获取TensorMap对象。
接口格式
const TensorMap &ImmutableInputs() const
接口参数
无。
使用样例
mindie_llm::InferRequestId runtimeReqId(0); std::shared_ptr<mindie_llm::InferRequest> runtimeRequest(runtimeReqId); 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); runtimeRequest->AddTensor(name, inputsTensor); TensorMap tensorMap = runtimeRequest->ImmutableInputs();
返回值
返回TensorMap对象。
父主题: InferRequest