mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-12 23:36:54 +08:00
Update pytorch_lstm_ts.py
This commit is contained in:
@@ -154,7 +154,7 @@ class LSTM(Model):
|
|||||||
mask = torch.isfinite(label)
|
mask = torch.isfinite(label)
|
||||||
|
|
||||||
if self.metric in ("", "loss"):
|
if self.metric in ("", "loss"):
|
||||||
return -self.loss_fn(pred[mask], label[mask], weight = None)
|
return -self.loss_fn(pred[mask], label[mask], weight=None)
|
||||||
|
|
||||||
raise ValueError("unknown metric `%s`" % self.metric)
|
raise ValueError("unknown metric `%s`" % self.metric)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user