(self, x)
| 278 | named_apply(partial(_init_weights, scheme=scheme), self) |
| 279 | |
| 280 | def forward(self, x): |
| 281 | avg_pool_out = self.avg_pool(x) |
| 282 | avg_out = self.fc2(self.activation(self.fc1(avg_pool_out))) |
| 283 | |
| 284 | max_pool_out= self.max_pool(x) |
| 285 | max_out = self.fc2(self.activation(self.fc1(max_pool_out))) |
| 286 | |
| 287 | out = avg_out + max_out |
| 288 | return self.sigmoid(out) |
| 289 | |
| 290 | # Spatial attention block (SAB) |
| 291 | class SAB(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected