From af8a041bb6a44942bfdb54373277afa02eadf44b Mon Sep 17 00:00:00 2001 From: Zeng Jinle <32832641+sneaxiy@users.noreply.github.com> Date: Sun, 21 Apr 2019 01:50:19 -0500 Subject: [PATCH] reduce py_reader unittest time (#16996) test=develop --- .../paddle/fluid/tests/unittests/test_decoupled_py_reader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/tests/unittests/test_decoupled_py_reader.py b/python/paddle/fluid/tests/unittests/test_decoupled_py_reader.py index 0fbf0d42f5d..a16f21c0f97 100644 --- a/python/paddle/fluid/tests/unittests/test_decoupled_py_reader.py +++ b/python/paddle/fluid/tests/unittests/test_decoupled_py_reader.py @@ -21,12 +21,13 @@ import unittest EPOCH_NUM = 20 BATCH_SIZE = 32 +BATCH_NUM = 20 CLASS_NUM = 10 def random_reader(): np.random.seed(1) - for i in range(BATCH_SIZE * 40): + for i in range(BATCH_SIZE * BATCH_NUM): image = np.random.random([784]) label = np.random.random_integers(low=0, high=CLASS_NUM - 1) yield image, label -- GitLab