From 305d211a6e59186eaa3d2e3112f0549f877962e2 Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Sat, 13 Oct 2018 23:23:14 +0800 Subject: [PATCH] fix data names test=develop --- python/paddle/fluid/layers/io.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/io.py b/python/paddle/fluid/layers/io.py index 9f5b4cd1819..042501318f8 100644 --- a/python/paddle/fluid/layers/io.py +++ b/python/paddle/fluid/layers/io.py @@ -598,6 +598,7 @@ def _py_reader(capacity, lod_level=lod_level)) counter += 1 + data_names = [feed_data.name for feed_data in actual_feed_list] feeder = DataFeeder( feed_list=actual_feed_list, place=core.CPUPlace()) paddle_reader = feeder.decorate_reader( @@ -605,7 +606,7 @@ def _py_reader(capacity, def __tensor_provider__(): for slots in paddle_reader(): - yield [slots[str(idx)] for idx in six.moves.xrange(counter)] + yield [slots[data_name] for data_name in data_names] __set_tensor_provider__(__tensor_provider__) -- GitLab