未验证 提交 b59a3db5 编写于 作者: W wuzewu 提交者: GitHub

Add enable_static() for model with static graph

......@@ -175,4 +175,5 @@ def main():
if __name__ == '__main__':
paddle.enable_static()
main()
......@@ -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()
......@@ -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(
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册