x: (b h w c)
(self, x: torch.Tensor)
| 295 | self.ffn_layernorm.reset_parameters() |
| 296 | |
| 297 | def forward(self, x: torch.Tensor): |
| 298 | ''' |
| 299 | x: (b h w c) |
| 300 | ''' |
| 301 | x = self.fc1(x) |
| 302 | x = self.activation_fn(x) |
| 303 | x = self.activation_dropout_module(x) |
| 304 | if self.dwconv is not None: |
| 305 | residual = x |
| 306 | x = self.dwconv(x) |
| 307 | x = x + residual |
| 308 | if self.ffn_layernorm is not None: |
| 309 | x = self.ffn_layernorm(x) |
| 310 | x = self.fc2(x) |
| 311 | x = self.dropout_module(x) |
| 312 | return x |
| 313 | |
| 314 | |
| 315 | class FeedForward(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected