1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-18 09:54:33 +08:00

Update recordTemp and report

This commit is contained in:
Jactus
2020-11-19 16:50:16 +08:00
parent dfc9351096
commit a8ad2120c9
15 changed files with 62 additions and 1394 deletions

View File

@@ -317,7 +317,6 @@ class LSTM(Model):
class LSTMModel(nn.Module):
def __init__(self, d_feat=6, hidden_size=64, num_layers=2, dropout=0.0):
super().__init__()
@@ -334,7 +333,7 @@ class LSTMModel(nn.Module):
def forward(self, x):
# x: [N, F*T]
x = x.reshape(len(x), self.d_feat, -1) # [N, F, T]
x = x.permute(0, 2, 1) # [N, T, F]
x = x.reshape(len(x), self.d_feat, -1) # [N, F, T]
x = x.permute(0, 2, 1) # [N, T, F]
out, _ = self.rnn(x)
return self.fc_out(out[:, -1, :]).squeeze()
return self.fc_out(out[:, -1, :]).squeeze()