Update RequiredTrainerInterface.md

This commit is contained in:
William Falcon 2019-08-13 06:39:10 -04:00 committed by GitHub
parent 4f0cf1e970
commit ea76ad2b28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ class CoolModel(pl.LightningModule):
y_hat = self.forward(x) y_hat = self.forward(x)
return {'loss': F.cross_entropy(y_hat, y)(y_hat, y)} return {'loss': F.cross_entropy(y_hat, y)(y_hat, y)}
def validation_step(self, batch, batch_nb): def validation_step(self, batch, batch_nb, dataloader_i):
# OPTIONAL # OPTIONAL
x, y = batch x, y = batch
y_hat = self.forward(x) y_hat = self.forward(x)