未验证 提交 a356a438 编写于 作者: M MissPenguin 提交者: GitHub

Merge pull request #2655 from littletomatodonkey/2.1/fix_eval_loader_win

fix eval laoder on win
......@@ -18,6 +18,7 @@ from __future__ import print_function
import os
import sys
import platform
import yaml
import time
import shutil
......@@ -335,8 +336,10 @@ def eval(model, valid_dataloader, post_process_class, eval_class,
total_frame = 0.0
total_time = 0.0
pbar = tqdm(total=len(valid_dataloader), desc='eval model:')
max_iter = len(valid_dataloader) - 1 if platform.system(
) == "Windows" else len(valid_dataloader)
for idx, batch in enumerate(valid_dataloader):
if idx >= len(valid_dataloader):
if idx >= max_iter:
break
images = batch[0]
start = time.time()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册