Skip to content

Commit

Permalink
improve save_persistable api doc. test=develop (PaddlePaddle#15911)
Browse files Browse the repository at this point in the history
  • Loading branch information
wzzju authored and shanyi15 committed Mar 1, 2019
1 parent 31d830d commit 46c5e37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/paddle/fluid/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,10 @@ def save_persistables(executor, dirname, main_program=None, filename=None):
exe = fluid.Executor(fluid.CPUPlace())
param_path = "./my_paddle_model"
# `prog` can be a program defined by the user
prog = fluid.default_main_program()
fluid.io.save_persistables(executor=exe, dirname=param_path,
main_program=None)
main_program=prog)
"""

if main_program and main_program._is_distributed:
Expand Down

0 comments on commit 46c5e37

Please sign in to comment.