(self, latent_dim, ffn_dim, dropout)
| 15 | class FFN(nn.Module): |
| 16 | |
| 17 | def __init__(self, latent_dim, ffn_dim, dropout): |
| 18 | super().__init__() |
| 19 | self.linear1 = nn.Linear(latent_dim, ffn_dim) |
| 20 | self.linear2 = zero_module(nn.Linear(ffn_dim, latent_dim)) |
| 21 | self.activation = nn.GELU() |
| 22 | self.dropout = nn.Dropout(dropout) |
| 23 | |
| 24 | def forward(self, x, **kwargs): |
| 25 | y = self.linear2(self.dropout(self.activation(self.linear1(x)))) |
no test coverage detected