{"record":{"id":"9053602c3e381134","repo":"opendatalab/MinerU","slug":"mode-model-name-model-is-not-implemented-905360","errorCode":null,"errorMessage":"mode[{model_name}_model] is not implemented!","messagePattern":"mode\\[(.+?)_model\\] is not implemented!","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"mineru/model/utils/pytorchocr/modeling/backbones/rec_mobilenet_v3.py","lineNumber":73,"sourceCode":"            cls_ch_squeeze = 960\n        elif model_name == \"small\":\n            cfg = [\n                # k, exp, c,  se,     nl,  s,\n                [3, 16, 16, True, \"relu\", (small_stride[0], 1)],\n                [3, 72, 24, False, \"relu\", (small_stride[1], 1)],\n                [3, 88, 24, False, \"relu\", 1],\n                [5, 96, 40, True, \"hard_swish\", (small_stride[2], 1)],\n                [5, 240, 40, True, \"hard_swish\", 1],\n                [5, 240, 40, True, \"hard_swish\", 1],\n                [5, 120, 48, True, \"hard_swish\", 1],\n                [5, 144, 48, True, \"hard_swish\", 1],\n                [5, 288, 96, True, \"hard_swish\", (small_stride[3], 1)],\n                [5, 576, 96, True, \"hard_swish\", 1],\n                [5, 576, 96, True, \"hard_swish\", 1],\n            ]\n            cls_ch_squeeze = 576\n        else:\n            raise NotImplementedError(\n                \"mode[\" + model_name + \"_model] is not implemented!\"\n            )\n\n        supported_scale = [0.35, 0.5, 0.75, 1.0, 1.25]\n        assert (\n            scale in supported_scale\n        ), \"supported scales are {} but input scale is {}\".format(\n            supported_scale, scale\n        )\n\n        inplanes = 16\n        # conv1\n        self.conv1 = ConvBNLayer(\n            in_channels=in_channels,\n            out_channels=make_divisible(inplanes * scale),\n            kernel_size=3,\n            stride=2,\n            padding=1,","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/opendatalab/MinerU/blob/4fe4bde114a23ee5dd637eae99b767f4669bf58c/mineru/model/utils/pytorchocr/modeling/backbones/rec_mobilenet_v3.py#L55-L91","documentation":"Same guard as the detection variant, but in the recognition MobileNetV3 backbone: only 'small' and 'large' model names have layer tables, so any other model_name raises NotImplementedError when the network is built.","triggerScenarios":"RecModel constructed with Backbone.name=MobileNetV3 and model_name other than 'small'/'large' (e.g. 'medium', 'tiny'), passed via YAML config or direct kwargs.","commonSituations":"Copying a det backbone config into a rec config with an unsupported variant; typo; using a width name from another framework.","solutions":["Set model_name to 'small' or 'large' in the recognition backbone config.","For other capacities use scale in [0.35, 0.5, 0.75, 1.0, 1.25] with a supported model_name."],"exampleFix":"# before\nBackbone:\n  name: MobileNetV3\n  model_name: tiny\n\n# after\nBackbone:\n  name: MobileNetV3\n  model_name: small\n  scale: 0.5","handlingStrategy":"validation","validationCode":"model_name = backbone_cfg.get(\"model_name\")\nassert model_name in {\"large\", \"small\"}, f\"MobileNetV3 rec supports large/small, got {model_name!r}\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate backbone config enums before model construction","Do not reuse det backbone configs for rec models"],"tags":["ocr","backbone","mobilenet","recognition","config","not-implemented"],"backgroundTag":null,"analyzedSha":"4fe4bde114a23ee5dd637eae99b767f4669bf58c","analyzedAt":"2026-08-14T21:29:18.456Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}