Skip to content
Snippets Groups Projects
Commit 362130f8 authored by Alexandre Chapin's avatar Alexandre Chapin :race_car:
Browse files

Fix problem with loss

parent cf2259ac
No related branches found
No related tags found
No related merge requests found
...@@ -172,7 +172,7 @@ class LitSlotAttentionAutoEncoder(pl.LightningModule): ...@@ -172,7 +172,7 @@ class LitSlotAttentionAutoEncoder(pl.LightningModule):
self.optimizer.step() self.optimizer.step()
self.log('train_mse', loss_value, on_epoch=True) self.log('train_mse', loss_value, on_epoch=True)
return {'loss': loss_value.item()} return {'loss': loss_value}
def validation_step(self, batch, batch_idx): def validation_step(self, batch, batch_idx):
"""Perform a single eval step.""" """Perform a single eval step."""
...@@ -189,5 +189,5 @@ class LitSlotAttentionAutoEncoder(pl.LightningModule): ...@@ -189,5 +189,5 @@ class LitSlotAttentionAutoEncoder(pl.LightningModule):
self.log('val_mse', loss_value) self.log('val_mse', loss_value)
self.log('val_psnr', psnr) self.log('val_psnr', psnr)
return {'loss': loss_value.item(), 'val_psnr': psnr.item()} return {'loss': loss_value, 'val_psnr': psnr.item()}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment