Skip to content

Commit

Permalink
Update tqdm for fixed width
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Oct 27, 2021
1 parent a4fece8 commit 9e4c719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def train(hyp, # path/to/hyp.yaml or hyp dictionary
pbar = enumerate(train_loader)
LOGGER.info(('\n' + '%10s' * 7) % ('Epoch', 'gpu_mem', 'box', 'obj', 'cls', 'labels', 'img_size'))
if RANK in [-1, 0]:
pbar = tqdm(pbar, total=nb) # progress bar
pbar = tqdm(pbar, total=nb, bar_format='{l_bar}{bar:10}{r_bar}{bar:-10b}') # progress bar
optimizer.zero_grad()
for i, (imgs, targets, paths, _) in pbar: # batch -------------------------------------------------------------
ni = i + nb * epoch # number integrated batches (since train start)
Expand Down

0 comments on commit 9e4c719

Please sign in to comment.