Skip to content

Commit dc8813a

Browse files
DDDivanoceci3
authored andcommitted
fix load bug (PaddlePaddle#2435)
load_persistables function returns a tuple which include parameters and optimizer
1 parent 7935b52 commit dc8813a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dygraph/cycle_gan/infer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def infer():
3838
os.makedirs(out_path)
3939
cycle_gan = Cycle_Gan("cycle_gan")
4040
save_dir = args.init_model
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 file in glob.glob(args.input):

0 commit comments

Comments
 (0)