提交 14fdead9 编写于 作者: littletomatodonkey's avatar littletomatodonkey

fix windows ms

上级 62147ec9
...@@ -43,7 +43,7 @@ class TrainReader(object): ...@@ -43,7 +43,7 @@ class TrainReader(object):
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) random.shuffle(img_id_list)
if sys.platform == "win32": if sys.platform == "win32" and self.num_workers != 1:
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
......
...@@ -233,7 +233,7 @@ class SimpleReader(object): ...@@ -233,7 +233,7 @@ class SimpleReader(object):
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) random.shuffle(img_id_list)
if sys.platform == "win32": if sys.platform == "win32" and self.num_workers != 1:
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册