MCPcopy Create free account
hub / github.com/VCIP-RGBD/DFormer / __init__

Method __init__

models/net_utils.py:176–182  ·  view source on GitHub ↗
(self, dim, reduction=1, num_heads=None, norm_layer=nn.BatchNorm2d)

Source from the content-addressed store, hash-verified

174# FFM
175class 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):

Callers

nothing calls this directly

Calls 3

CrossPathClass · 0.85
ChannelEmbedClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected