提交 dc8813aa 编写于 作者: D Divano 提交者: lvmengsi

fix load bug (#2435)

load_persistables function returns a tuple which include parameters and optimizer
上级 7935b528
......@@ -38,7 +38,7 @@ def infer():
os.makedirs(out_path)
cycle_gan = Cycle_Gan("cycle_gan")
save_dir = args.init_model
restore = fluid.dygraph.load_persistables(save_dir)
restore, _ = fluid.dygraph.load_persistables(save_dir)
cycle_gan.load_dict(restore)
cycle_gan.eval()
for file in glob.glob(args.input):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册