未验证 提交 f437c46f 编写于 作者: X Xin Pan 提交者: GitHub

Merge pull request #11071 from panyx0718/fix_infer_test

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