From bda05dc38746883ae9eeb900ac46bd20f3ac59e9 Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Sat, 6 Oct 2018 21:45:47 +0800 Subject: [PATCH] reset yield_num after one pass --- python/paddle/reader/decorator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/paddle/reader/decorator.py b/python/paddle/reader/decorator.py index e06c151d30..7b73a3a930 100644 --- a/python/paddle/reader/decorator.py +++ b/python/paddle/reader/decorator.py @@ -522,6 +522,7 @@ def fake(reader, data_num): while fake_reader.yield_num < data_num: yield fake_reader.data fake_reader.yield_num += 1 + fake_reader.yield_num = 0 fake_reader.data = None fake_reader.yield_num = 0 -- GitLab