From a7a14dadb696061a86d99035ead0781c7566cf79 Mon Sep 17 00:00:00 2001 From: sebftw Date: Mon, 19 Aug 2019 00:17:43 +0200 Subject: [PATCH] F.cross_entropy(y_hat, y)(y_hat, y) typo. (#137) This seems to be a typo. Throws TypeError: 'Tensor' object is not callable. --- docs/LightningModule/RequiredTrainerInterface.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/LightningModule/RequiredTrainerInterface.md b/docs/LightningModule/RequiredTrainerInterface.md index 9c280a00..d7863c7c 100644 --- a/docs/LightningModule/RequiredTrainerInterface.md +++ b/docs/LightningModule/RequiredTrainerInterface.md @@ -50,13 +50,13 @@ class CoolModel(pl.LightningModule): # REQUIRED x, y = batch y_hat = self.forward(x) - return {'loss': F.cross_entropy(y_hat, y)(y_hat, y)} + return {'loss': F.cross_entropy(y_hat, y)} def validation_step(self, batch, batch_nb): # OPTIONAL x, y = batch y_hat = self.forward(x) - return {'val_loss': F.cross_entropy(y_hat, y)(y_hat, y)} + return {'val_loss': F.cross_entropy(y_hat, y)} def validation_end(self, outputs): # OPTIONAL