From 2611ed258bef6136310acf084884d640f12fe61e Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Wed, 12 May 2021 10:32:51 +0800 Subject: [PATCH] Polish unittest test_decoupled_py_reader (#32832) * polish test decoupled py reader * remove bin file --- .../fluid/tests/unittests/test_decoupled_py_reader.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 a7c1b14d269..0be329ac959 100644 --- a/python/paddle/fluid/tests/unittests/test_decoupled_py_reader.py +++ b/python/paddle/fluid/tests/unittests/test_decoupled_py_reader.py @@ -19,9 +19,9 @@ import time import six import unittest -EPOCH_NUM = 20 -BATCH_SIZE = 32 -BATCH_NUM = 20 +EPOCH_NUM = 5 +BATCH_SIZE = 16 +BATCH_NUM = 10 CLASS_NUM = 10 @@ -29,7 +29,7 @@ def random_reader(): np.random.seed(1) for i in range(BATCH_SIZE * BATCH_NUM): image = np.random.random([784]) - label = np.random.random_integers(low=0, high=CLASS_NUM - 1) + label = np.random.randint(low=0, high=CLASS_NUM) yield image, label -- GitLab