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

Method __init__

models/TABL/bl_layer.py:7–21  ·  view source on GitHub ↗
(self, d2, d1, t1, t2)

Source from the content-addressed store, hash-verified

5
6class BL_layer(pl.LightningModule):
7 def __init__(self, d2, d1, t1, t2):
8 super().__init__()
9 weight1 = torch.Tensor(d2, d1)
10 self.W1 = nn.Parameter(weight1)
11 nn.init.kaiming_uniform_(self.W1, nonlinearity='relu')
12
13 weight2 = torch.Tensor(t1, t2)
14 self.W2 = nn.Parameter(weight2)
15 nn.init.kaiming_uniform_(self.W2, nonlinearity='relu')
16
17 bias1 = torch.zeros((d2, t2))
18 self.B = nn.Parameter(bias1)
19 nn.init.constant_(self.B, 0)
20
21 self.activation = nn.ReLU()
22
23 def forward(self, x):
24

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected