From 64683cf84ae0eab4c2d2b59f5ee3f8043ffcc989 Mon Sep 17 00:00:00 2001 From: tangwei12 Date: Tue, 14 Aug 2018 15:34:48 +0800 Subject: [PATCH] fix --- python/paddle/fluid/io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/io.py b/python/paddle/fluid/io.py index c3af35c532..8665925286 100644 --- a/python/paddle/fluid/io.py +++ b/python/paddle/fluid/io.py @@ -809,7 +809,7 @@ def _endpoints_replacement(program, endpoints): for op in program.global_block().ops: if op.has_attr(ENDPOINT_MAP): op.set_attr(ENDPOINT_MAP, endpoints) - program = program.clone() + program._sync_with_cpp() return program @@ -877,7 +877,7 @@ def get_parameter_value_by_name(name, executor, program=None): def _load_slice_up_vars(executor, dirname, slice_vars_and_atts): - if slice_vars_and_atts == None or len(slice_vars_and_atts) == 0: + if not slice_vars_and_atts: return load_prog = Program() -- GitLab