提交 816da57f 编写于 作者: X xzl

refine paddle_merge_model

上级 9f1d1bf4
...@@ -20,6 +20,7 @@ limitations under the License. */ ...@@ -20,6 +20,7 @@ limitations under the License. */
#include "paddle/utils/PythonUtil.h" #include "paddle/utils/PythonUtil.h"
DEFINE_string(model_dir, "", "Directory for separated model files"); DEFINE_string(model_dir, "", "Directory for separated model files");
DEFINE_string(config_file, "", "Config file for the model");
DEFINE_string(model_file, "", "File for merged model file"); DEFINE_string(model_file, "", "File for merged model file");
using namespace paddle; // NOLINT using namespace paddle; // NOLINT
...@@ -28,7 +29,7 @@ using namespace std; // NOLINT ...@@ -28,7 +29,7 @@ using namespace std; // NOLINT
int main(int argc, char** argv) { int main(int argc, char** argv) {
initMain(argc, argv); initMain(argc, argv);
initPython(argc, argv); initPython(argc, argv);
string confFile = TrainerConfigHelper::getConfigNameFromPath(FLAGS_model_dir); string confFile = FLAGS_config_file;
#ifdef PADDLE_ONLY_CPU #ifdef PADDLE_ONLY_CPU
FLAGS_use_gpu = false; FLAGS_use_gpu = false;
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册