Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Show progress bar per epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
nshaud committed May 30, 2018
1 parent afb6081 commit 5eada10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ def train(net, optimizer, criterion, data_loader, epoch, scheduler=None,
avg_loss = 0.

# Run the training loop for one epoch
for batch_idx, (data, target) in enumerate(data_loader):
for batch_idx, (data, target) in tqdm(enumerate(data_loader), total=len(data_loader)):
# Load the data into the GPU if required
if cuda:
data, target = data.cuda(), target.cuda()
Expand Down

0 comments on commit 5eada10

Please sign in to comment.