diff --git a/pdseg/eval.py b/pdseg/eval.py index f39764f7d5acc3ad7932b9e9683bbb178b8940b1..31565b9a576be6048b7d0f0cf46e228faa02d2f4 100644 --- a/pdseg/eval.py +++ b/pdseg/eval.py @@ -175,4 +175,5 @@ def main(): if __name__ == '__main__': + paddle.enable_static() main() diff --git a/pdseg/export_model.py b/pdseg/export_model.py index e0beceb308c0e23b2ee6ef25d3ce064d0cca02e4..2f3135a5c35bba1dc5efa255021420273e861d8a 100644 --- a/pdseg/export_model.py +++ b/pdseg/export_model.py @@ -23,6 +23,7 @@ import pprint import cv2 import argparse import numpy as np +import paddle import paddle.fluid as fluid from utils.config import cfg @@ -131,4 +132,5 @@ def main(): if __name__ == '__main__': + paddle.enable_static() main() diff --git a/pdseg/train.py b/pdseg/train.py index aa29de92ded7c79acd4ca41fa74ee6eaeb8993c2..75830a37f1f4c0bbb22cb9a7b1f1f8ce62131e61 100644 --- a/pdseg/train.py +++ b/pdseg/train.py @@ -454,6 +454,7 @@ def main(args): if __name__ == '__main__': + paddle.enable_static() args = parse_args() if fluid.core.is_compiled_with_cuda() != True and args.use_gpu == True: print( diff --git a/pdseg/vis.py b/pdseg/vis.py index 6d6a457646e545e3b879b5bc55ea4e2b2848949a..9c46e10052619ba01978f2ec3cf501eb8ea906d5 100644 --- a/pdseg/vis.py +++ b/pdseg/vis.py @@ -27,6 +27,7 @@ import argparse import pprint import cv2 import numpy as np +import paddle import paddle.fluid as fluid from PIL import Image as PILImage @@ -199,6 +200,7 @@ def visualize(cfg, if __name__ == '__main__': + paddle.enable_static() args = parse_args() if args.cfg_file is not None: cfg.update_from_file(args.cfg_file)