Update evaluation_basic.rst

Error in the documentation where training loss is calculated as `F.mse_loss(x_hat, x)`. Changed to `F.mse_loss(x_hat, y)`
This commit is contained in:
Karthik Venkataramani 2024-02-13 09:37:18 -08:00 committed by GitHub
parent b98e1d2414
commit 0eefe39aea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ To add a test loop, implement the **test_step** method of the LightningModule
x = x.view(x.size(0), -1)
z = self.encoder(x)
x_hat = self.decoder(z)
test_loss = F.mse_loss(x_hat, x)
test_loss = F.mse_loss(x_hat, y)
self.log("test_loss", test_loss)
----
@ -109,7 +109,7 @@ To add a validation loop, implement the **validation_step** method of the Lightn
x = x.view(x.size(0), -1)
z = self.encoder(x)
x_hat = self.decoder(z)
val_loss = F.mse_loss(x_hat, x)
val_loss = F.mse_loss(x_hat, y)
self.log("val_loss", val_loss)
----