(self, x, size: Tuple[int, int])
| 214 | self.mlp = Mlp(in_features=dim, hidden_features=mlp_hidden_dim, act_layer=act_layer, drop=drop) |
| 215 | |
| 216 | def forward(self, x, size: Tuple[int, int]): |
| 217 | # Conv-Attention. |
| 218 | x = self.cpe(x, size) |
| 219 | cur = self.norm1(x) |
| 220 | cur = self.factoratt_crpe(cur, size) |
| 221 | x = x + self.drop_path(cur) |
| 222 | |
| 223 | # MLP. |
| 224 | cur = self.norm2(x) |
| 225 | cur = self.mlp(cur) |
| 226 | x = x + self.drop_path(cur) |
| 227 | |
| 228 | return x |
| 229 | |
| 230 | |
| 231 | class ParallelBlock(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected