MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / __init__

Method __init__

detrsmpl/models/backbones/hrnet.py:20–47  ·  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'),
                 block_init_cfg=None,
                 init_cfg=None)

Source from the content-addressed store, hash-verified

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

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 3

_check_branchesMethod · 0.95
_make_branchesMethod · 0.95
_make_fuse_layersMethod · 0.95

Tested by

no test coverage detected