MCPcopy Create free account
hub / github.com/FinancialComputingUCL/LOBFrame / forward

Method forward

models/DeepLob/deeplob.py:100–118  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

98 self.fc1 = nn.Linear(64, 3)
99
100 def forward(self, x):
101 x = self.conv1(x)
102 x = self.conv2(x)
103 x = self.conv3(x)
104
105 x_inp1 = self.inp1(x)
106 x_inp2 = self.inp2(x)
107 x_inp3 = self.inp3(x)
108
109 x = torch.cat((x_inp1, x_inp2, x_inp3), dim=1)
110
111 x = x.permute(0, 2, 1, 3)
112 x = torch.reshape(x, (-1, x.shape[1], x.shape[2]))
113
114 x, _ = self.lstm(x)
115 x = x[:, -1, :]
116 logits = self.fc1(x)
117
118 return logits

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected