Skip to content

Commit

Permalink
fix load bug (PaddlePaddle#2435)
Browse files Browse the repository at this point in the history
load_persistables function returns a tuple which include parameters and optimizer
  • Loading branch information
DDDivano authored and ceci3 committed Jun 18, 2019
1 parent 7935b52 commit dc8813a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dygraph/cycle_gan/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit dc8813a

Please sign in to comment.