1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-01 10:01:19 +08:00

Update pytorch_lstm_ts.py

This commit is contained in:
you-n-g
2022-02-07 00:05:49 +08:00
committed by GitHub
parent 5da5cf5175
commit 357ee74b6f

View File

@@ -154,7 +154,7 @@ class LSTM(Model):
mask = torch.isfinite(label)
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)