Skip to content

Commit 9b9824c

Browse files
committed
Avoid ImageNet-C evaluation every epoch
1 parent 5f44213 commit 9b9824c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

imagenet.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -482,11 +482,11 @@ def main():
482482
'{:.2f}'
483483
.format((epoch + 1), train_loss_ema, test_loss, 100. * test_acc1))
484484

485-
corruption_accs = test_c(net, test_transform)
486-
for c in CORRUPTIONS:
487-
print('\t'.join(map(str, [c] + corruption_accs[c])))
485+
corruption_accs = test_c(net, test_transform)
486+
for c in CORRUPTIONS:
487+
print('\t'.join(map(str, [c] + corruption_accs[c])))
488488

489-
print('mCE (normalized by AlexNet):', compute_mce(corruption_accs))
489+
print('mCE (normalized by AlexNet):', compute_mce(corruption_accs))
490490

491491

492492
if __name__ == '__main__':

0 commit comments

Comments
 (0)