diff --git a/fluid/PaddleCV/image_classification/reader_cv2.py b/fluid/PaddleCV/image_classification/reader_cv2.py index dd9462c5c7076d57f7e137153a93534152cbb64b..b61f1ecee46fd0640bf0c5e24aa37be900fd29b2 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"))