Skip to content

Commit a38fc70

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] Update the metrics output on reference scripts (#4408)
Summary: * Update log message. * Update fstring. Reviewed By: datumbox Differential Revision: D31268040 fbshipit-source-id: 68387f431d23bb7981a8446a514defad898fb0c4
1 parent fbaa1b4 commit a38fc70

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

references/classification/train.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ def evaluate(model, criterion, data_loader, device, print_freq=100, log_suffix='
7171
# gather the stats from all processes
7272
metric_logger.synchronize_between_processes()
7373

74-
print(' * Acc@1 {top1.global_avg:.3f} Acc@5 {top5.global_avg:.3f}'
75-
.format(top1=metric_logger.acc1, top5=metric_logger.acc5))
74+
print(f'{header} Acc@1 {metric_logger.acc1.global_avg:.3f} Acc@5 {metric_logger.acc5.global_avg:.3f}')
7675
return metric_logger.acc1.global_avg
7776

7877

0 commit comments

Comments
 (0)