Log test loss.

This commit is contained in:
Alexander Engelsberger 2021-05-20 13:47:20 +02:00
parent faf1a88f99
commit b7fc5df386

View File

@ -95,7 +95,7 @@ class GLVQ(AbstractPrototypeModel):
def test_step(self, batch, batch_idx): def test_step(self, batch, batch_idx):
# `model.eval()` and `torch.no_grad()` handled by pl # `model.eval()` and `torch.no_grad()` handled by pl
out, test_loss = self.shared_step(batch, batch_idx) out, test_loss = self.shared_step(batch, batch_idx)
return test_loss self.log_dict({'test_loss': test_loss})
# def predict_step(self, batch, batch_idx, dataloader_idx=None): # def predict_step(self, batch, batch_idx, dataloader_idx=None):
# pass # pass