From 7876b213cb3e8be02d51fa9304f007d7ffe3a9c6 Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Thu, 28 Jun 2018 19:33:32 +0800 Subject: [PATCH] update --- python/paddle/fluid/layers/io.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/python/paddle/fluid/layers/io.py b/python/paddle/fluid/layers/io.py index 49ccfa92920..9de88e2c320 100644 --- a/python/paddle/fluid/layers/io.py +++ b/python/paddle/fluid/layers/io.py @@ -259,11 +259,8 @@ def monkey_patch_reader_methods(reader): return reader -def _copy_reader_var_(block, var, new_name=None): - if new_name == None: - new_name = var.name - new_var = block.create_var( - name=str(new_name), type=core.VarDesc.VarType.READER) +def _copy_reader_var_(block, var): + new_var = block.create_var(name=var.name, type=core.VarDesc.VarType.READER) new_var.desc.set_shapes(var.desc.shapes()) new_var.desc.set_dtypes(var.desc.dtypes()) new_var.persistable = True -- GitLab