reduce py_reader unittest time (#16996)

test=develop
shanyi15-patch-1
Zeng Jinle 6 years ago committed by GitHub
parent 45ebafc33e
commit af8a041bb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save