(self, x)
| 144 | nn.Linear(int(dim * mlp_ratio), dim), nn.Dropout(proj_dropout)) |
| 145 | |
| 146 | def forward(self, x): |
| 147 | if self.post_norm: |
| 148 | x = x + self.norm1(self.attn(x)) |
| 149 | x = x + self.norm2(self.mlp(x)) |
| 150 | else: |
| 151 | x = x + self.attn(self.norm1(x)) |
| 152 | x = x + self.mlp(self.norm2(x)) |
| 153 | return x |
| 154 | |
| 155 | |
| 156 | class AttentionPool(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected