Skip to content

Commit f437c46

Browse files
authored
Merge pull request #11071 from panyx0718/fix_infer_test
make infer test more stable.
2 parents d906106 + 44ea234 commit f437c46

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

paddle/contrib/inference/test_paddle_inference_api_impl.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ TEST(paddle_inference_api_impl, image_classification) {
144144
float* data = static_cast<float*>(outputs[0].data.data);
145145
float* lod_data = output1.data<float>();
146146
for (size_t j = 0; j < len / sizeof(float); ++j) {
147-
EXPECT_LT(lod_data[j] - data[j], 1e-10);
148-
EXPECT_GT(lod_data[j] - data[j], -1e-10);
147+
EXPECT_NEAR(lod_data[j], data[j], 1e-3);
149148
}
150149
free(data);
151150
}

0 commit comments

Comments
 (0)