From 23bdd0a223cc3e88c62fb8f48155c83455c9fede Mon Sep 17 00:00:00 2001 From: superjomn Date: Tue, 8 Jan 2019 15:11:48 +0800 Subject: [PATCH] fix analysis_tester bug test=develop --- paddle/fluid/inference/analysis/analyzer_tester.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/inference/analysis/analyzer_tester.cc b/paddle/fluid/inference/analysis/analyzer_tester.cc index f84e1ab6b82..4c84d02d867 100644 --- a/paddle/fluid/inference/analysis/analyzer_tester.cc +++ b/paddle/fluid/inference/analysis/analyzer_tester.cc @@ -80,8 +80,8 @@ void TestWord2vecPrediction(const std::string& model_path) { i++) { LOG(INFO) << "data: " << static_cast(outputs.front().data.data())[i] << " result: " << result[i]; - PADDLE_ENFORCE(static_cast(outputs.front().data.data())[i], - result[i]); + EXPECT_NEAR(static_cast(outputs.front().data.data())[i], result[i], + 1e-3); } } -- GitLab