(self, in_chan, out_chan)
| 83 | return x |
| 84 | class AttentionRefinementModule(nn.Module): |
| 85 | def __init__(self, in_chan, out_chan): |
| 86 | super(AttentionRefinementModule, self).__init__() |
| 87 | self.conv=ConvBnAct(in_chan,out_chan,3,1,1) |
| 88 | self.scale = nn.Sequential( |
| 89 | nn.AdaptiveAvgPool2d(1), |
| 90 | nn.Conv2d(out_chan, out_chan, 1, bias=False), |
| 91 | nn.BatchNorm2d(out_chan), |
| 92 | nn.Sigmoid(), |
| 93 | ) |
| 94 | |
| 95 | def forward(self, x): |
| 96 | x = self.conv(x) |