(self, d2, d1, t1, t2)
| 5 | |
| 6 | class BiN(pl.LightningModule): |
| 7 | def __init__(self, d2, d1, t1, t2): |
| 8 | super().__init__() |
| 9 | self.t1 = t1 |
| 10 | self.d1 = d1 |
| 11 | self.t2 = t2 |
| 12 | self.d2 = d2 |
| 13 | |
| 14 | bias1 = torch.Tensor(t1, 1) |
| 15 | self.B1 = nn.Parameter(bias1) |
| 16 | nn.init.constant_(self.B1, 0) |
| 17 | |
| 18 | l1 = torch.Tensor(t1, 1) |
| 19 | self.l1 = nn.Parameter(l1) |
| 20 | nn.init.xavier_normal_(self.l1) |
| 21 | |
| 22 | bias2 = torch.Tensor(d1, 1) |
| 23 | self.B2 = nn.Parameter(bias2) |
| 24 | nn.init.constant_(self.B2, 0) |
| 25 | |
| 26 | l2 = torch.Tensor(d1, 1) |
| 27 | self.l2 = nn.Parameter(l2) |
| 28 | nn.init.xavier_normal_(self.l2) |
| 29 | |
| 30 | y1 = torch.Tensor(1, ) |
| 31 | self.y1 = nn.Parameter(y1) |
| 32 | nn.init.constant_(self.y1, 0.5) |
| 33 | |
| 34 | y2 = torch.Tensor(1, ) |
| 35 | self.y2 = nn.Parameter(y2) |
| 36 | nn.init.constant_(self.y2, 0.5) |
| 37 | |
| 38 | def forward(self, x): |
| 39 |
nothing calls this directly
no outgoing calls
no test coverage detected