Merge pull request #11071 from panyx0718/fix_infer_test

make infer test more stable.
release/0.13.0
Xin Pan 8 years ago committed by GitHub
commit f437c46ffd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);
}

Loading…
Cancel
Save