diff --git a/python/paddle/fluid/io.py b/python/paddle/fluid/io.py index 0782933c6c4851b410ee3fdf14d4f9d9e83d49cc..e74a87fc68db0e126098f7188db4a712dff2612d 100644 --- a/python/paddle/fluid/io.py +++ b/python/paddle/fluid/io.py @@ -145,7 +145,7 @@ def save_vars(executor, prog = fluid.default_main_program() fluid.io.save_vars(executor=exe, dirname=path, main_program=prog, - vars=None) + vars=None, predicate = name_has_fc) # All variables in `main_program` whose name includes "fc" will be saved. # And variables are going to be saved separately. @@ -369,7 +369,7 @@ def load_vars(executor, prog = fluid.default_main_program() fluid.io.load_vars(executor=exe, dirname=path, main_program=prog, - vars=None) + vars=None, predicate=name_has_fc) # All variables in `main_program` whose name includes "fc" will be loaded. # And all the variables are supposed to have been saved in differnet files.