diff --git a/python/paddle/fluid/io.py b/python/paddle/fluid/io.py index e5eb34eb0f5cfceeaa7ac09d5bd3d9dc60b7692f..f2d9666afa927b04260d3e0e25fa858941ab47fb 100644 --- a/python/paddle/fluid/io.py +++ b/python/paddle/fluid/io.py @@ -401,13 +401,12 @@ def load_vars(executor, inputs={}, outputs={"Out": load_var_list}, attrs={'file_path': os.path.join(dirname, filename)}) - - if main_program._slice_vars_and_atts: - _load_slice_up_vars(executor, dirname, - main_program._slice_vars_and_atts) - executor.run(load_prog) + # load slice vars on pserver, if have it. + _load_slice_up_vars(executor, dirname, + main_program._slice_vars_and_atts) + def load_params(executor, dirname, main_program=None, filename=None): """