Skip to content

Commit 46c5e37

Browse files
wzzjushanyi15
authored andcommitted
improve save_persistable api doc. test=develop (#15911)
1 parent 31d830d commit 46c5e37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/paddle/fluid/io.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,10 @@ def save_persistables(executor, dirname, main_program=None, filename=None):
468468
469469
exe = fluid.Executor(fluid.CPUPlace())
470470
param_path = "./my_paddle_model"
471+
# `prog` can be a program defined by the user
471472
prog = fluid.default_main_program()
472473
fluid.io.save_persistables(executor=exe, dirname=param_path,
473-
main_program=None)
474+
main_program=prog)
474475
"""
475476

476477
if main_program and main_program._is_distributed:

0 commit comments

Comments
 (0)