提交 a1dcc10a 编写于 作者: Z zhiqiu

add enable_static

上级 bbd53e5c
...@@ -176,4 +176,5 @@ def main(): ...@@ -176,4 +176,5 @@ def main():
if __name__ == '__main__': if __name__ == '__main__':
paddle.enable_static()
main() main()
...@@ -23,6 +23,7 @@ import pprint ...@@ -23,6 +23,7 @@ import pprint
import cv2 import cv2
import argparse import argparse
import numpy as np import numpy as np
import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from utils.config import cfg from utils.config import cfg
...@@ -125,4 +126,5 @@ def main(): ...@@ -125,4 +126,5 @@ def main():
if __name__ == '__main__': if __name__ == '__main__':
paddle.enable_static()
main() main()
...@@ -506,6 +506,7 @@ def main(args): ...@@ -506,6 +506,7 @@ def main(args):
if __name__ == '__main__': if __name__ == '__main__':
paddle.enable_static()
args = parse_args() args = parse_args()
if fluid.core.is_compiled_with_cuda() != True and args.use_gpu == True: if fluid.core.is_compiled_with_cuda() != True and args.use_gpu == True:
print( print(
......
...@@ -27,6 +27,7 @@ import argparse ...@@ -27,6 +27,7 @@ import argparse
import pprint import pprint
import cv2 import cv2
import numpy as np import numpy as np
import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from PIL import Image as PILImage from PIL import Image as PILImage
...@@ -204,6 +205,7 @@ def visualize(cfg, ...@@ -204,6 +205,7 @@ def visualize(cfg,
if __name__ == '__main__': if __name__ == '__main__':
paddle.enable_static()
args = parse_args() args = parse_args()
if args.cfg_file is not None: if args.cfg_file is not None:
cfg.update_from_file(args.cfg_file) cfg.update_from_file(args.cfg_file)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册