diff --git a/src/framework/executor.h b/src/framework/executor.h index edbfd5cdcc91b6f746f71a755311a1c80e24941c..dc5a542362638200c0abec052ac7aabd55c5a375 100644 --- a/src/framework/executor.h +++ b/src/framework/executor.h @@ -75,7 +75,7 @@ class Executor { int batch_size_; bool use_optimize_; bool lod_mode_; - PaddleMobileConfigInternal config_ = PaddleMobileConfigInternal(); + PaddleMobileConfigInternal config_; Program program_; std::shared_ptr program_desc_; typedef std::shared_ptr> OperatorBasePtr; diff --git a/src/io/paddle_mobile.cpp b/src/io/paddle_mobile.cpp index 0f22788481a8908e98257fb69a2876f525c6ec6c..7e8fcb82887dca02a84677aebe2b8a4547338bc9 100644 --- a/src/io/paddle_mobile.cpp +++ b/src/io/paddle_mobile.cpp @@ -45,8 +45,8 @@ PMStatus PaddleMobile::Load(const std::string &dirname, if (executor_.get() == nullptr) { executor_ = std::make_shared>( - loader_->Load(dirname, optimize, quantification), batch_size, optimize, - lod_mode); + loader_->Load(dirname, optimize, quantification), config_, batch_size, + optimize, lod_mode); } else { LOG(kLOG_INFO) << "executor inited"; } @@ -67,7 +67,7 @@ PMStatus PaddleMobile::Load(const std::string &model_path, if (executor_.get() == nullptr) { executor_ = std::make_shared>( - loader_->Load(model_path, para_path, optimize, quantification), + loader_->Load(model_path, para_path, optimize, quantification), config_, batch_size, optimize, lod_mode); } else { LOG(kLOG_INFO) << "executor inited";