(self, num_classes, trunk='hrnetv2', criterion=None)
| 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:] |
nothing calls this directly
no test coverage detected