Skip to content

Commit

Permalink
Update pytorch_alstm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Lihanyiyi authored May 21, 2024
1 parent af15d97 commit 7d77d54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qlib/contrib/model/pytorch_alstm.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def loss_fn(self, pred, label):
def metric_fn(self, pred, label):
mask = torch.isfinite(label)

if self.metric in ("", "loss"):
if self.metric in ("", "loss","mse"):
return -self.loss_fn(pred[mask], label[mask])

raise ValueError("unknown metric `%s`" % self.metric)
Expand Down

0 comments on commit 7d77d54

Please sign in to comment.