Skip to content

Commit

Permalink
Fix ProgressMeter usage in imagenet validation (pytorch#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
bddppq authored and soumith committed Jun 20, 2019
1 parent 2ea9f6a commit 1de2ff9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions imagenet/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,10 @@ def validate(val_loader, model, criterion, args):
losses = AverageMeter('Loss', ':.4e')
top1 = AverageMeter('Acc@1', ':6.2f')
top5 = AverageMeter('Acc@5', ':6.2f')
progress = ProgressMeter(len(val_loader), batch_time, losses, top1, top5,
prefix='Test: ')
progress = ProgressMeter(
len(val_loader),
[batch_time, losses, top1, top5],
prefix='Test: ')

# switch to evaluate mode
model.eval()
Expand Down

0 comments on commit 1de2ff9

Please sign in to comment.