fix val accuracy printing in lite example (#12632)

This commit is contained in:
Adrian Wälchli 2022-04-06 19:01:12 +02:00 committed by GitHub
parent 0a72efd210
commit b1ef41f60a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ class Lite(LightningLite):
# all_gather is used to aggregated the value across processes
test_loss = self.all_gather(test_loss).sum() / len(test_loader.dataset)
print(f"\nTest set: Average loss: {test_loss:.4f}, Accuracy: ({test_acc.compute():.0f}%)\n")
print(f"\nTest set: Average loss: {test_loss:.4f}, Accuracy: ({100 * test_acc.compute():.0f}%)\n")
test_acc.reset()
if hparams.dry_run: