put the shuffer into iter

This commit is contained in:
shaohua.zhang 2020-07-26 10:24:57 +08:00 committed by GitHub
parent dd32d0f636
commit b5f1f89abf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -41,8 +41,8 @@ class TrainReader(object):
label_infor_list = fin.readlines() label_infor_list = fin.readlines()
img_num = len(label_infor_list) img_num = len(label_infor_list)
img_id_list = list(range(img_num)) img_id_list = list(range(img_num))
random.shuffle(img_id_list)
if sys.platform == "win32": if sys.platform == "win32":
random.shuffle(img_id_list)
print("multiprocess is not fully compatible with Windows." print("multiprocess is not fully compatible with Windows."
"num_workers will be 1.") "num_workers will be 1.")
self.num_workers = 1 self.num_workers = 1