未验证 提交 0fa6c8a3 编写于 作者: 石晓伟 提交者: GitHub

fix a syntax error, test=develop (#31930)

上级 98e803e0
......@@ -75,14 +75,15 @@ int test_predictor_zero_copy(const AnalysisConfig& config_in,
}
std::vector<float> input({1});
auto in_tensor{predictor->GetInputTensor(predictor->GetInputNames().front())};
auto in_tensor =
predictor->GetInputTensor(predictor->GetInputNames().front());
in_tensor->Reshape({1, 1});
in_tensor->copy_from_cpu(input.data());
predictor->ZeroCopyRun();
auto out_tensor{
predictor->GetOutputTensor(predictor->GetOutputNames().front())};
auto out_tensor =
predictor->GetOutputTensor(predictor->GetOutputNames().front());
std::vector<float> data_o(10);
out_tensor->copy_to_cpu(data_o.data());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册