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

Method __init__

network/ocrnet.py:162–168  ·  view source on GitHub ↗
(self, num_classes, trunk='hrnetv2', criterion=None)

Source from the content-addressed store, hash-verified

160 OCR net
161 """
162 def __init__(self, num_classes, trunk='hrnetv2', criterion=None):
163 super(MscaleOCR, self).__init__()
164 self.criterion = criterion
165 self.backbone, _, _, high_level_ch = get_trunk(trunk)
166 self.ocr = OCR_block(high_level_ch)
167 self.scale_attn = make_attn_head(
168 in_ch=cfg.MODEL.OCR.MID_CHANNELS, out_ch=1)
169
170 def _fwd(self, x):
171 x_size = x.size()[2:]

Callers

nothing calls this directly

Calls 4

get_trunkFunction · 0.90
make_attn_headFunction · 0.90
OCR_blockClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected