提交 1ba79a58 编写于 作者: D Divano 提交者: lvmengsi

Update test.py (#2408)

fix load bug
上级 f892f4d9
...@@ -38,7 +38,7 @@ def test(): ...@@ -38,7 +38,7 @@ def test():
os.makedirs(out_path) os.makedirs(out_path)
cycle_gan = Cycle_Gan("cycle_gan") cycle_gan = Cycle_Gan("cycle_gan")
save_dir = args.init_model + str(epoch) save_dir = args.init_model + str(epoch)
restore = fluid.dygraph.load_persistables(save_dir) restore, _ = fluid.dygraph.load_persistables(save_dir)
cycle_gan.load_dict(restore) cycle_gan.load_dict(restore)
cycle_gan.eval() cycle_gan.eval()
for data_A , data_B in zip(A_test_reader(), B_test_reader()): for data_A , data_B in zip(A_test_reader(), B_test_reader()):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册