From 9c8b19fc91b40d5cc075e91546184c439f87954d Mon Sep 17 00:00:00 2001 From: sangoly Date: Mon, 24 Jun 2019 04:49:32 +0000 Subject: [PATCH] fix compile error test=develop --- paddle/fluid/lite/api/inceptionv4_test.cc | 4 +--- paddle/fluid/lite/tools/debug/CMakeLists.txt | 2 +- paddle/fluid/lite/tools/debug/analysis_tool.py | 2 -- paddle/fluid/lite/tools/debug/check_model.sh | 8 ++++---- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/paddle/fluid/lite/api/inceptionv4_test.cc b/paddle/fluid/lite/api/inceptionv4_test.cc index 977aa04abc..cea4eb450f 100644 --- a/paddle/fluid/lite/api/inceptionv4_test.cc +++ b/paddle/fluid/lite/api/inceptionv4_test.cc @@ -63,9 +63,7 @@ TEST(InceptionV4, test) { 0.00070094, 0.00080584, 0.00044525, 0.00074907, 0.00059774, 0.00063654}); for (int i = 0; i < results.size(); ++i) { - // TODO(sangoly): fix assert - // EXPECT_NEAR(out->data()[i], results[i], 1e-5); - LOG(INFO) << "out -> " << out->data()[i]; + EXPECT_NEAR(out->data()[i], results[i], 1e-5); } ASSERT_EQ(out->dims().size(), 2); ASSERT_EQ(out->dims()[0], 1); diff --git a/paddle/fluid/lite/tools/debug/CMakeLists.txt b/paddle/fluid/lite/tools/debug/CMakeLists.txt index da033d6140..6a022fe4e2 100644 --- a/paddle/fluid/lite/tools/debug/CMakeLists.txt +++ b/paddle/fluid/lite/tools/debug/CMakeLists.txt @@ -1,4 +1,4 @@ -cc_library(debug_utils_lite SRCS debug_utils.cc) +cc_library(debug_utils_lite SRCS debug_utils.cc DEPS op_params_lite) lite_cc_binary(lite_model_debug_tool SRCS model_debug_tool.cc DEPS diff --git a/paddle/fluid/lite/tools/debug/analysis_tool.py b/paddle/fluid/lite/tools/debug/analysis_tool.py index 73430ee411..3de8ed9249 100644 --- a/paddle/fluid/lite/tools/debug/analysis_tool.py +++ b/paddle/fluid/lite/tools/debug/analysis_tool.py @@ -355,8 +355,6 @@ class Analyser(object): self._output_diff_nodes(results, diff_vars) def _output_diff_nodes(self, results, diff_vars): - logger.info('is here') - def output_param_info(inputs, outputs, infos, fd): def tensor_repr(name): return '\t'.join([ diff --git a/paddle/fluid/lite/tools/debug/check_model.sh b/paddle/fluid/lite/tools/debug/check_model.sh index 67b898ad06..d730de7203 100755 --- a/paddle/fluid/lite/tools/debug/check_model.sh +++ b/paddle/fluid/lite/tools/debug/check_model.sh @@ -158,10 +158,10 @@ function main { PY_OUTPUT_TENSOR="${i#*=}" shift ;; - --build_root_dir=*) - BUILD_ROOT_DIR="${i#*=}" - shift - ;; + --build_root_dir=*) + BUILD_ROOT_DIR="${i#*=}" + shift + ;; debug_cpp_stage) run_cpp_debug_tool shift -- GitLab