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

Method __init__

segmentation/backbones/hrnet.py:21–48  ·  view source on GitHub ↗
(self,
                 num_branches,
                 blocks,
                 num_blocks,
                 in_channels,
                 num_channels,
                 multiscale_output=True,
                 with_cp=False,
                 conv_cfg=None,
                 norm_cfg=dict(type='BN', requires_grad=True),
                 block_init_cfg=None,
                 init_cfg=None)

Source from the content-addressed store, hash-verified

19 """
20
21 def __init__(self,
22 num_branches,
23 blocks,
24 num_blocks,
25 in_channels,
26 num_channels,
27 multiscale_output=True,
28 with_cp=False,
29 conv_cfg=None,
30 norm_cfg=dict(type='BN', requires_grad=True),
31 block_init_cfg=None,
32 init_cfg=None):
33 super(HRModule, self).__init__(init_cfg)
34 self.block_init_cfg = block_init_cfg
35 self._check_branches(num_branches, num_blocks, in_channels,
36 num_channels)
37
38 self.in_channels = in_channels
39 self.num_branches = num_branches
40
41 self.multiscale_output = multiscale_output
42 self.norm_cfg = norm_cfg
43 self.conv_cfg = conv_cfg
44 self.with_cp = with_cp
45 self.branches = self._make_branches(num_branches, blocks, num_blocks,
46 num_channels)
47 self.fuse_layers = self._make_fuse_layers()
48 self.relu = nn.ReLU(inplace=False)
49
50 def _check_branches(self, num_branches, num_blocks, in_channels,
51 num_channels):

Callers

nothing calls this directly

Calls 4

_check_branchesMethod · 0.95
_make_branchesMethod · 0.95
_make_fuse_layersMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected