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

Method __init__

segmentation/backbones/bisenetv2.py:322–353  ·  view source on GitHub ↗
(self,
                 in_channels=3,
                 out_channels=16,
                 conv_cfg=None,
                 norm_cfg=dict(type='BN'),
                 act_cfg=dict(type='ReLU'),
                 init_cfg=None)

Source from the content-addressed store, hash-verified

320 """
321
322 def __init__(self,
323 in_channels=3,
324 out_channels=16,
325 conv_cfg=None,
326 norm_cfg=dict(type='BN'),
327 act_cfg=dict(type='ReLU'),
328 init_cfg=None):
329 super(CEBlock, self).__init__(init_cfg=init_cfg)
330 self.in_channels = in_channels
331 self.out_channels = out_channels
332 self.gap = nn.Sequential(
333 nn.AdaptiveAvgPool2d((1, 1)),
334 build_norm_layer(norm_cfg, self.in_channels)[1])
335 self.conv_gap = ConvModule(
336 in_channels=self.in_channels,
337 out_channels=self.out_channels,
338 kernel_size=1,
339 stride=1,
340 padding=0,
341 conv_cfg=conv_cfg,
342 norm_cfg=norm_cfg,
343 act_cfg=act_cfg)
344 # Note: in paper here is naive conv2d, no bn-relu
345 self.conv_last = ConvModule(
346 in_channels=self.out_channels,
347 out_channels=self.out_channels,
348 kernel_size=3,
349 stride=1,
350 padding=1,
351 conv_cfg=conv_cfg,
352 norm_cfg=norm_cfg,
353 act_cfg=act_cfg)
354
355 def forward(self, x):
356 identity = x

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected