未验证 提交 506e7970 编写于 作者: T TeslaZhao 提交者: GitHub

Merge pull request #1806 from TeslaZhao/develop

general_response_op.cpp 支持新的返回类型
......@@ -183,6 +183,13 @@ int GeneralResponseOp::inference() {
VLOG(2) << "(logid=" << log_id << ")Prepare float16 var ["
<< model_config->_fetch_name[idx] << "].";
tensor->set_tensor_content(in->at(idx).data.data(), in->at(idx).data.length());
} else {
// dType is not in paddle::PaddleDType, It's not return type of Paddle Inference.
// Copy all fields of Input data to output tensor.
VLOG(2) << "(logid=" << log_id << ")Prepare SPECIAL TYPE=" << dtype << " var ["
<< model_config->_fetch_name[idx] << "].";
tensor->set_elem_type(dtype);
tensor->set_tensor_content(in->at(idx).data.data(), in->at(idx).data.length());
}
VLOG(2) << "(logid=" << log_id << ") fetch var ["
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册