Skip to content

Commit

Permalink
put the shuffer into iter
Browse files Browse the repository at this point in the history
  • Loading branch information
BeyondYourself authored Jul 26, 2020
1 parent dd32d0f commit b5f1f89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ppocr/data/det/dataset_traversal.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def __call__(self, process_id):
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
Expand Down

0 comments on commit b5f1f89

Please sign in to comment.