swap example (#4029)

This commit is contained in:
Jirka Borovec 2020-10-10 01:11:54 +02:00 committed by GitHub
parent 9e91976323
commit 1b4209bc35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -185,8 +185,8 @@ class LitAutoEncoder(pl.LightningModule):
x = x.view(x.size(0), -1)
z = self.encoder(x)
x_hat = self.decoder(z)
self.log('train_loss', loss)
loss = F.mse_loss(x_hat, x)
self.log('train_loss', loss)
return loss
def configure_optimizers(self):