(self, dim, reduction=1, num_heads=None, norm_layer=nn.BatchNorm2d)
| 174 | # FFM |
| 175 | class FeatureFusionModule(nn.Module): |
| 176 | def __init__(self, dim, reduction=1, num_heads=None, norm_layer=nn.BatchNorm2d): |
| 177 | super().__init__() |
| 178 | self.cross = CrossPath(dim=dim, reduction=reduction, num_heads=num_heads) |
| 179 | self.channel_emb = ChannelEmbed( |
| 180 | in_channels=dim * 2, out_channels=dim, reduction=reduction, norm_layer=norm_layer |
| 181 | ) |
| 182 | self.apply(self._init_weights) |
| 183 | |
| 184 | def _init_weights(self, m): |
| 185 | if isinstance(m, nn.Linear): |
nothing calls this directly
no test coverage detected