Update new-project.rst (#1655)

fix a typo
This commit is contained in:
weipengOO98 2020-04-30 19:58:42 +08:00 committed by GitHub
parent f9c9e39ab8
commit 2ec8d61e94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ To also add a validation loop add the following functions
def validation_epoch_end(self, outputs):
avg_loss = torch.stack([x['val_loss'] for x in outputs]).mean()
tensorboard_logs = {'val_loss': avg_loss}
return {'val_loss': avg_loss, 'log': tensorboard_logs
return {'val_loss': avg_loss, 'log': tensorboard_logs}
def val_dataloader(self):
# TODO: do a real train/val split