From 2c7ed47e2f04087bbcbbd67c0f07f1d0505ae3f2 Mon Sep 17 00:00:00 2001 From: milkfish1988 Date: Thu, 21 Feb 2019 11:28:24 +0800 Subject: [PATCH] Update reader_cv2.py fix bug --- fluid/PaddleCV/image_classification/reader_cv2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fluid/PaddleCV/image_classification/reader_cv2.py b/fluid/PaddleCV/image_classification/reader_cv2.py index dd9462c5..b61f1ece 100644 --- a/fluid/PaddleCV/image_classification/reader_cv2.py +++ b/fluid/PaddleCV/image_classification/reader_cv2.py @@ -145,7 +145,7 @@ def _reader_creator(file_list, with open(file_list) as flist: full_lines = [line.strip() for line in flist] if shuffle: - np.random.shuffle(lines) + np.random.shuffle(full_lines) if mode == 'train' and os.getenv('PADDLE_TRAINING_ROLE'): # distributed mode if the env var `PADDLE_TRAINING_ROLE` exits trainer_id = int(os.getenv("PADDLE_TRAINER_ID", "0")) -- GitLab