Skip to content

Commit

Permalink
Update val.py
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Nov 3, 2021
1 parent af37c12 commit ac72e0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion val.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ def run(data,
dt, p, r, f1, mp, mr, map50, map = [0.0, 0.0, 0.0], 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
loss = torch.zeros(3, device=device)
jdict, stats, ap, ap_class = [], [], [], []
for batch_i, (img, targets, paths, shapes) in enumerate(tqdm(dataloader, desc=s)):
pbar = tqdm(enumerate(dataloader), desc=s, bar_format='{l_bar}{bar:10}{r_bar}{bar:-10b}') # progress bar
for batch_i, (img, targets, paths, shapes) in pbar:
t1 = time_sync()
img = img.to(device, non_blocking=True)
img = img.half() if half else img.float() # uint8 to fp16/32
Expand Down

0 comments on commit ac72e0e

Please sign in to comment.