From b00fbd962c0bff30307bcc833761e6a0e2ca075a Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Fri, 15 Jun 2018 15:30:04 +0800 Subject: [PATCH] fix error --- python/paddle/fluid/layers/io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/layers/io.py b/python/paddle/fluid/layers/io.py index e397515ff6c..b004312d2dd 100644 --- a/python/paddle/fluid/layers/io.py +++ b/python/paddle/fluid/layers/io.py @@ -637,10 +637,10 @@ def read_file(reader): out = [ helper.create_tmp_variable( stop_gradient=True, dtype='float32') - for _ in range(len(file_obj.desc.shapes())) + for _ in range(len(reader.desc.shapes())) ] helper.append_op( - type='read', inputs={'Reader': [file_obj]}, outputs={'Out': out}) + type='read', inputs={'Reader': [reader]}, outputs={'Out': out}) if len(out) == 1: return out[0] else: -- GitLab