(self, x)
| 252 | self.prenorm = prenorm |
| 253 | |
| 254 | def forward(self, x): |
| 255 | if self.prenorm: |
| 256 | x = self.norm1(x + self.drop_path(self.mixer(x))) |
| 257 | x = self.norm2(x + self.drop_path(self.mlp(x))) |
| 258 | else: |
| 259 | x = x + self.drop_path(self.mixer(self.norm1(x))) |
| 260 | x = x + self.drop_path(self.mlp(self.norm2(x))) |
| 261 | return x |
| 262 | |
| 263 | |
| 264 | class PatchEmbed(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected