Skip to content

Commit

Permalink
debug: debug nan in loss
Browse files Browse the repository at this point in the history
  • Loading branch information
macwiatrak committed Feb 1, 2025
1 parent 53695c1 commit e40d0a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bactgraph/modeling/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def training_step(self, batch, batch_idx):
x_batch, edge_index_batch, y = batch
preds = self.forward(x_batch, edge_index_batch.type(torch.long))
loss = F.mse_loss(preds, y.view(-1))
print("Loss:", loss)
print("preds", preds, "y", y)
self.log("train_loss", loss, on_step=True, on_epoch=True, prog_bar=True)
return loss

Expand Down

0 comments on commit e40d0a9

Please sign in to comment.