From b8897cc638de4b6a8f0e6ad4e1d1867bc1f94fbf Mon Sep 17 00:00:00 2001 From: zhiqiu Date: Thu, 24 Sep 2020 16:52:55 +0800 Subject: [PATCH] add enable_static() --- tools/eval.py | 2 ++ tools/export_model.py | 2 ++ tools/export_serving_model.py | 2 ++ tools/face_eval.py | 2 ++ tools/train.py | 2 ++ tools/train_multi_machine.py | 2 ++ 6 files changed, 12 insertions(+) diff --git a/tools/eval.py b/tools/eval.py index 84da9b49a..262dd7923 100644 --- a/tools/eval.py +++ b/tools/eval.py @@ -164,6 +164,8 @@ def main(): if __name__ == '__main__': + import paddle + paddle.enable_static() parser = ArgsParser() parser.add_argument( "--json_eval", diff --git a/tools/export_model.py b/tools/export_model.py index 1cf6549c7..70351b9f1 100644 --- a/tools/export_model.py +++ b/tools/export_model.py @@ -226,6 +226,8 @@ def main(): if __name__ == '__main__': + import paddle + paddle.enable_static() parser = ArgsParser() parser.add_argument( "--output_dir", diff --git a/tools/export_serving_model.py b/tools/export_serving_model.py index 6050e785c..d8897af48 100644 --- a/tools/export_serving_model.py +++ b/tools/export_serving_model.py @@ -94,6 +94,8 @@ def main(): if __name__ == '__main__': + import paddle + paddle.enable_static() parser = ArgsParser() parser.add_argument( "--output_dir", diff --git a/tools/face_eval.py b/tools/face_eval.py index fb6517d01..3a68def89 100644 --- a/tools/face_eval.py +++ b/tools/face_eval.py @@ -270,6 +270,8 @@ def main(): if __name__ == '__main__': + import paddle + paddle.enable_static() parser = ArgsParser() parser.add_argument( "-f", diff --git a/tools/train.py b/tools/train.py index dd2edbd43..587373c72 100644 --- a/tools/train.py +++ b/tools/train.py @@ -313,6 +313,8 @@ def main(): if __name__ == '__main__': + import paddle + paddle.enable_static() parser = ArgsParser() parser.add_argument( "-r", diff --git a/tools/train_multi_machine.py b/tools/train_multi_machine.py index 2a82f0505..bae3bde52 100644 --- a/tools/train_multi_machine.py +++ b/tools/train_multi_machine.py @@ -307,6 +307,8 @@ def main(): if __name__ == '__main__': + import paddle + paddle.enable_static() parser = ArgsParser() parser.add_argument( "-r", -- GitLab