From 94b51860c52ffe319c93a4b9fc358ae2eb089d53 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 27 Oct 2021 15:42:10 +0200 Subject: [PATCH] Update val.py --- val.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/val.py b/val.py index 1fc98c71198b..ce9919d513af 100644 --- a/val.py +++ b/val.py @@ -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