(self, num_classes, channels)
| 151 | return feat_align, feat_arm |
| 152 | class BiseNetDecoder(nn.Module): |
| 153 | def __init__(self, num_classes, channels): |
| 154 | super(BiseNetDecoder, self).__init__() |
| 155 | channels8,channels16=channels["8"],channels["16"] |
| 156 | self.arm16 = AttentionRefinementModule(channels16, 128) |
| 157 | self.conv_head16 = ConvBnAct(128,128,3,1,1) |
| 158 | self.avg_pool=nn.AdaptiveAvgPool2d(1) |
| 159 | self.conv_avg = ConvBnAct(channels16,128) |
| 160 | self.ffm=FeatureFusionModule(128+channels8,128) |
| 161 | self.conv=ConvBnAct(128,128,3,1,1) |
| 162 | self.classifier=nn.Conv2d(128, num_classes, 1) |
| 163 | |
| 164 | def forward(self, x): |
| 165 | x8,x16= x["8"], x["16"] |
nothing calls this directly
no test coverage detected