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

Update test.py (#2408)

fix load bug
上级 f892f4d9
......@@ -38,7 +38,7 @@ def test():
os.makedirs(out_path)
cycle_gan = Cycle_Gan("cycle_gan")
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.eval()
for data_A , data_B in zip(A_test_reader(), B_test_reader()):
......@@ -74,4 +74,4 @@ def test():
if __name__ == "__main__":
args = parser.parse_args()
print_arguments(args)
test()
\ No newline at end of file
test()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册