(self, x)
| 226 | self.sigmoid = nn.Sigmoid() |
| 227 | |
| 228 | def forward(self, x): |
| 229 | avgout = torch.mean(x, dim=1, keepdim=True) |
| 230 | maxout, _ = torch.max(x, dim=1, keepdim=True) |
| 231 | out = torch.cat([avgout, maxout], dim=1) |
| 232 | out = self.sigmoid(self.conv2d(out)) |
| 233 | return out |
| 234 | |
| 235 | |
| 236 | class CBAM(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected