From aabe84708a4907175cb17c4ec4c3312aaafd3a48 Mon Sep 17 00:00:00 2001 From: Zhen Wang Date: Fri, 1 Mar 2019 18:42:42 +0800 Subject: [PATCH] improve save_persistable api doc. test=develop (#15911) --- python/paddle/fluid/io.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/io.py b/python/paddle/fluid/io.py index 24e102b6c26..17751597984 100644 --- a/python/paddle/fluid/io.py +++ b/python/paddle/fluid/io.py @@ -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: -- GitLab