MCPcopy Create free account
hub / github.com/NVIDIA/semantic-segmentation / _check_branches

Method _check_branches

network/hrnetv2.py:127–145  ·  view source on GitHub ↗
(self, num_branches, blocks, num_blocks,
                        num_inchannels, num_channels)

Source from the content-addressed store, hash-verified

125 self.relu = nn.ReLU(inplace=relu_inplace)
126
127 def _check_branches(self, num_branches, blocks, num_blocks,
128 num_inchannels, num_channels):
129 if num_branches != len(num_blocks):
130 error_msg = 'NUM_BRANCHES({}) <> NUM_BLOCKS({})'.format(
131 num_branches, len(num_blocks))
132 logx.msg(error_msg)
133 raise ValueError(error_msg)
134
135 if num_branches != len(num_channels):
136 error_msg = 'NUM_BRANCHES({}) <> NUM_CHANNELS({})'.format(
137 num_branches, len(num_channels))
138 logx.msg(error_msg)
139 raise ValueError(error_msg)
140
141 if num_branches != len(num_inchannels):
142 error_msg = 'NUM_BRANCHES({}) <> NUM_INCHANNELS({})'.format(
143 num_branches, len(num_inchannels))
144 logx.msg(error_msg)
145 raise ValueError(error_msg)
146
147 def _make_one_branch(self, branch_index, block, num_blocks, num_channels,
148 stride=1):

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected