"examples/vscode:/vscode.git/clone" did not exist on "c18941b01ad0ea6b07d020f353d81153c632a374"
Unverified Commit 099957c9 authored by littletomatodonkey's avatar littletomatodonkey Committed by GitHub
Browse files

fix eval laoder on win (#2654)

parent c2702229
...@@ -18,6 +18,7 @@ from __future__ import print_function ...@@ -18,6 +18,7 @@ from __future__ import print_function
import os import os
import sys import sys
import platform
import yaml import yaml
import time import time
import shutil import shutil
...@@ -338,8 +339,10 @@ def eval(model, valid_dataloader, post_process_class, eval_class, ...@@ -338,8 +339,10 @@ def eval(model, valid_dataloader, post_process_class, eval_class,
total_frame = 0.0 total_frame = 0.0
total_time = 0.0 total_time = 0.0
pbar = tqdm(total=len(valid_dataloader), desc='eval model:') 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): for idx, batch in enumerate(valid_dataloader):
if idx >= len(valid_dataloader): if idx >= max_iter:
break break
images = batch[0] images = batch[0]
start = time.time() start = time.time()
......
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