{"record":{"id":"d9e6f8a0ff219940","repo":"tensorflow/models","slug":"model-s-is-not-supported-d9e6f8","errorCode":null,"errorMessage":"Model %s is not supported.","messagePattern":"Model (.+?) is not supported\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/legacy/detection/modeling/factory.py","lineNumber":35,"sourceCode":"\nfrom official.legacy.detection.modeling import maskrcnn_model\nfrom official.legacy.detection.modeling import olnmask_model\nfrom official.legacy.detection.modeling import retinanet_model\nfrom official.legacy.detection.modeling import shapemask_model\n\n\ndef model_generator(params):\n  \"\"\"Model function generator.\"\"\"\n  if params.type == 'retinanet':\n    model_fn = retinanet_model.RetinanetModel(params)\n  elif params.type == 'mask_rcnn':\n    model_fn = maskrcnn_model.MaskrcnnModel(params)\n  elif params.type == 'olnmask':\n    model_fn = olnmask_model.OlnMaskModel(params)\n  elif params.type == 'shapemask':\n    model_fn = shapemask_model.ShapeMaskModel(params)\n  else:\n    raise ValueError('Model %s is not supported.'% params.type)\n\n  return model_fn\n","sourceCodeStart":17,"sourceCodeEnd":38,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/legacy/detection/modeling/factory.py#L17-L38","documentation":"Dispatch guard in the detection model factory: params.type did not match any of the supported branches (retinanet, mask_rcnn, olnmask, shapemask), so no model class could be constructed. The params.type configuration string is the faulty input.","triggerScenarios":"Thrown at official/legacy/detection/modeling/factory.py:35 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set params.type to one of 'retinanet', 'mask_rcnn', 'olnmask', or 'shapemask'","Check the command-line/flag spelling of the model type"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}