From 94c4cd1a98f0fcee06580d3394d1e51b62977cf0 Mon Sep 17 00:00:00 2001 From: lujun Date: Fri, 19 Apr 2019 19:12:20 +0800 Subject: [PATCH] fix dy-load bug, test=develop --- python/paddle/fluid/dygraph/checkpoint.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/python/paddle/fluid/dygraph/checkpoint.py b/python/paddle/fluid/dygraph/checkpoint.py index ee3bbd938..3d797d504 100644 --- a/python/paddle/fluid/dygraph/checkpoint.py +++ b/python/paddle/fluid/dygraph/checkpoint.py @@ -133,7 +133,6 @@ def _save_var_to_file(stat_dict, file_dir, file_name): def _load_var_from_file(file_dir): - def walk_filename(file_dir): var_name_list = [] if os.path.exists(file_dir) and os.path.exists(os.path.join(file_dir)): @@ -148,9 +147,7 @@ def _load_var_from_file(file_dir): load_block = default_main_program().global_block() load_var_map = {} - file_var_list = walk_filename(file_dir) - for var_name in file_var_list: new_var = Variable(block=load_block, name=var_name) load_block.append_op( -- GitLab