(self, x, relative_pos_enc=None)
| 498 | drop_path) if drop_path > 0. else nn.Identity() |
| 499 | |
| 500 | def _forward_impl(self, x, relative_pos_enc=None): |
| 501 | # x = x + self.pos_embed(x) |
| 502 | x = x + self.drop_path(self.token_mixer(self.norm1(x), relative_pos_enc)) |
| 503 | x = x + self.drop_path(self.mlp(self.norm2(x))) |
| 504 | return x |
| 505 | |
| 506 | def forward(self, x, relative_pos_enc=None): |
| 507 | if self.grad_checkpoint and x.requires_grad: |