From 7ba55aa294b0d73d78e65e45c5f2974eb3a4cfa0 Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Fri, 21 Sep 2018 20:35:37 +0800 Subject: [PATCH] fix CMAKE --- paddle/fluid/train/CMakeLists.txt | 4 +++- paddle/fluid/train/test_train_recognize_digits.cc | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/train/CMakeLists.txt b/paddle/fluid/train/CMakeLists.txt index 9f10f7363..6cd9cbe37 100644 --- a/paddle/fluid/train/CMakeLists.txt +++ b/paddle/fluid/train/CMakeLists.txt @@ -25,4 +25,6 @@ function(train_test TARGET_NAME) endfunction(train_test) -train_test(recognize_digits ARGS mlp conv) +if(WITH_TESTING) + train_test(recognize_digits ARGS mlp conv) +endif() diff --git a/paddle/fluid/train/test_train_recognize_digits.cc b/paddle/fluid/train/test_train_recognize_digits.cc index 45997985e..e8731dd51 100644 --- a/paddle/fluid/train/test_train_recognize_digits.cc +++ b/paddle/fluid/train/test_train_recognize_digits.cc @@ -52,8 +52,6 @@ void Train() { PADDLE_ENFORCE_NE(loss_name, "", "loss not found"); - // init all parameters - // prepare data auto x_var = scope.Var("img"); auto x_tensor = x_var->GetMutable(); -- GitLab