提交 46c5e378 编写于 作者: Z Zhen Wang 提交者: Cheerego

improve save_persistable api doc. test=develop (#15911)

上级 31d830de
...@@ -468,9 +468,10 @@ def save_persistables(executor, dirname, main_program=None, filename=None): ...@@ -468,9 +468,10 @@ def save_persistables(executor, dirname, main_program=None, filename=None):
exe = fluid.Executor(fluid.CPUPlace()) exe = fluid.Executor(fluid.CPUPlace())
param_path = "./my_paddle_model" param_path = "./my_paddle_model"
# `prog` can be a program defined by the user
prog = fluid.default_main_program() prog = fluid.default_main_program()
fluid.io.save_persistables(executor=exe, dirname=param_path, fluid.io.save_persistables(executor=exe, dirname=param_path,
main_program=None) main_program=prog)
""" """
if main_program and main_program._is_distributed: if main_program and main_program._is_distributed:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册