Skip to content

Commit 1ba79a5

Browse files
DDDivanoceci3
authored andcommitted
Update test.py (PaddlePaddle#2408)
fix load bug
1 parent f892f4d commit 1ba79a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dygraph/cycle_gan/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test():
3838
os.makedirs(out_path)
3939
cycle_gan = Cycle_Gan("cycle_gan")
4040
save_dir = args.init_model + str(epoch)
41-
restore = fluid.dygraph.load_persistables(save_dir)
41+
restore, _ = fluid.dygraph.load_persistables(save_dir)
4242
cycle_gan.load_dict(restore)
4343
cycle_gan.eval()
4444
for data_A , data_B in zip(A_test_reader(), B_test_reader()):
@@ -74,4 +74,4 @@ def test():
7474
if __name__ == "__main__":
7575
args = parser.parse_args()
7676
print_arguments(args)
77-
test()
77+
test()

0 commit comments

Comments
 (0)