提交 7876b213 编写于 作者: F fengjiayi

update

上级 c15c6c15
...@@ -259,11 +259,8 @@ def monkey_patch_reader_methods(reader): ...@@ -259,11 +259,8 @@ def monkey_patch_reader_methods(reader):
return reader return reader
def _copy_reader_var_(block, var, new_name=None): def _copy_reader_var_(block, var):
if new_name == None: new_var = block.create_var(name=var.name, type=core.VarDesc.VarType.READER)
new_name = var.name
new_var = block.create_var(
name=str(new_name), type=core.VarDesc.VarType.READER)
new_var.desc.set_shapes(var.desc.shapes()) new_var.desc.set_shapes(var.desc.shapes())
new_var.desc.set_dtypes(var.desc.dtypes()) new_var.desc.set_dtypes(var.desc.dtypes())
new_var.persistable = True new_var.persistable = True
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册