"tests/vscode:/vscode.git/clone" did not exist on "e0b62a5abad636b19b7f2a6ecbf84ae4537edb25"
Unverified Commit fce0a57d authored by shaohua.zhang's avatar shaohua.zhang Committed by GitHub
Browse files

move the shuffer into def sample_iter_reader

parent 701adba2
......@@ -41,13 +41,12 @@ class TrainReader(object):
label_infor_list = fin.readlines()
img_num = len(label_infor_list)
img_id_list = list(range(img_num))
if sys.platform == "win32":
random.shuffle(img_id_list)
if sys.platform == "win32" and self.num_workers != 1:
print("multiprocess is not fully compatible with Windows."
"num_workers will be 1.")
self.num_workers = 1
def sample_iter_reader():
random.shuffle(img_id_list)
for img_id in range(process_id, img_num, self.num_workers):
label_infor = label_infor_list[img_id_list[img_id]]
outs = self.process(label_infor)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment