未验证 提交 a379c724 编写于 作者: B Bin Long 提交者: GitHub

Update infer.py : fix python 2.7 imcompitable problem

上级 02c880d3
......@@ -147,9 +147,9 @@ class ImageReader:
# process multiple images with multithreading
def process(self, imgs, use_pr=False):
imgs_data = []
with ThreadPoolExecutor(max_workers=self.config.batch_size) as exec:
with ThreadPoolExecutor(max_workers=self.config.batch_size) as exe_pool:
tasks = [
exec.submit(self.process_worker, imgs, idx, use_pr)
exe_pool.submit(self.process_worker, imgs, idx, use_pr)
for idx in range(len(imgs))
]
for task in as_completed(tasks):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册