(
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,
)
| 19 | """ |
| 20 | |
| 21 | def __init__( |
| 22 | self, |
| 23 | num_branches, |
| 24 | blocks, |
| 25 | num_blocks, |
| 26 | in_channels, |
| 27 | num_channels, |
| 28 | multiscale_output=True, |
| 29 | with_cp=False, |
| 30 | conv_cfg=None, |
| 31 | norm_cfg=dict(type="BN", requires_grad=True), |
| 32 | block_init_cfg=None, |
| 33 | init_cfg=None, |
| 34 | ): |
| 35 | super(HRModule, self).__init__(init_cfg) |
| 36 | self.block_init_cfg = block_init_cfg |
| 37 | self._check_branches(num_branches, num_blocks, in_channels, num_channels) |
| 38 | |
| 39 | self.in_channels = in_channels |
| 40 | self.num_branches = num_branches |
| 41 | |
| 42 | self.multiscale_output = multiscale_output |
| 43 | self.norm_cfg = norm_cfg |
| 44 | self.conv_cfg = conv_cfg |
| 45 | self.with_cp = with_cp |
| 46 | self.branches = self._make_branches(num_branches, blocks, num_blocks, 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, num_channels): |
| 51 | """Check branches configuration.""" |
nothing calls this directly
no test coverage detected