(self, dim: int, dropout: int = 0.1)
| 21 | """ |
| 22 | |
| 23 | def __init__(self, dim: int, dropout: int = 0.1): |
| 24 | super().__init__() |
| 25 | self.net = nn.Sequential( |
| 26 | BitLinear(dim, 4 * dim), |
| 27 | nn.ReLU(), |
| 28 | BitLinear(4 * dim, dim), |
| 29 | nn.Dropout(dropout), |
| 30 | ) |
| 31 | |
| 32 | def forward(self, x): |
| 33 | return self.net(x) |