From b5f1f89abfb7a44ead75865fef5e41d2dc19a606 Mon Sep 17 00:00:00 2001 From: "shaohua.zhang" Date: Sun, 26 Jul 2020 10:24:57 +0800 Subject: [PATCH] put the shuffer into iter --- ppocr/data/det/dataset_traversal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ppocr/data/det/dataset_traversal.py b/ppocr/data/det/dataset_traversal.py index 89c776d5..76e298c2 100644 --- a/ppocr/data/det/dataset_traversal.py +++ b/ppocr/data/det/dataset_traversal.py @@ -40,9 +40,9 @@ class TrainReader(object): with open(self.label_file_path, "rb") as fin: label_infor_list = fin.readlines() img_num = len(label_infor_list) - img_id_list = list(range(img_num)) - random.shuffle(img_id_list) + img_id_list = list(range(img_num)) if sys.platform == "win32": + random.shuffle(img_id_list) print("multiprocess is not fully compatible with Windows." "num_workers will be 1.") self.num_workers = 1 -- GitLab