提交 759cb237 编写于 作者: X Xin Pan

follow comments

上级 1555dc51
...@@ -144,8 +144,7 @@ TEST(paddle_inference_api_impl, image_classification) { ...@@ -144,8 +144,7 @@ TEST(paddle_inference_api_impl, image_classification) {
float* data = static_cast<float*>(outputs[0].data.data); float* data = static_cast<float*>(outputs[0].data.data);
float* lod_data = output1.data<float>(); float* lod_data = output1.data<float>();
for (size_t j = 0; j < len / sizeof(float); ++j) { for (size_t j = 0; j < len / sizeof(float); ++j) {
EXPECT_LT(lod_data[j] - data[j], 1e-3); EXPECT_NEAR (lod_data[j], data[j], 1e-6);
EXPECT_GT(lod_data[j] - data[j], -1e-3);
} }
free(data); free(data);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册