MCPcopy Create free account
hub / github.com/alinlab/SelfPatch / __init__

Method __init__

segmentation/backbones/fast_scnn.py:215–255  ·  view source on GitHub ↗
(self,
                 higher_in_channels,
                 lower_in_channels,
                 out_channels,
                 conv_cfg=None,
                 norm_cfg=dict(type='BN'),
                 dwconv_act_cfg=dict(type='ReLU'),
                 conv_act_cfg=None,
                 align_corners=False)

Source from the content-addressed store, hash-verified

213 """
214
215 def __init__(self,
216 higher_in_channels,
217 lower_in_channels,
218 out_channels,
219 conv_cfg=None,
220 norm_cfg=dict(type='BN'),
221 dwconv_act_cfg=dict(type='ReLU'),
222 conv_act_cfg=None,
223 align_corners=False):
224 super(FeatureFusionModule, self).__init__()
225 self.conv_cfg = conv_cfg
226 self.norm_cfg = norm_cfg
227 self.dwconv_act_cfg = dwconv_act_cfg
228 self.conv_act_cfg = conv_act_cfg
229 self.align_corners = align_corners
230 self.dwconv = ConvModule(
231 lower_in_channels,
232 out_channels,
233 3,
234 padding=1,
235 groups=out_channels,
236 conv_cfg=self.conv_cfg,
237 norm_cfg=self.norm_cfg,
238 act_cfg=self.dwconv_act_cfg)
239 self.conv_lower_res = ConvModule(
240 out_channels,
241 out_channels,
242 1,
243 conv_cfg=self.conv_cfg,
244 norm_cfg=self.norm_cfg,
245 act_cfg=self.conv_act_cfg)
246
247 self.conv_higher_res = ConvModule(
248 higher_in_channels,
249 out_channels,
250 1,
251 conv_cfg=self.conv_cfg,
252 norm_cfg=self.norm_cfg,
253 act_cfg=self.conv_act_cfg)
254
255 self.relu = nn.ReLU(True)
256
257 def forward(self, higher_res_feature, lower_res_feature):
258 lower_res_feature = resize(

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected