{"record":{"id":"147b04a63bb73ad5","repo":"tensorflow/models","slug":"the-mobilenet-version-is-not-supported","errorCode":null,"errorMessage":"The MobileNet version {} is not supported","messagePattern":"The MobileNet version (.+?) is not supported","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/vision/modeling/backbones/mobilenet.py","lineNumber":1290,"sourceCode":"      min_depth: An `int` of minimum depth (number of channels) for all\n        convolution ops. Enforced when filter_size_scale < 1, and not an active\n        constraint when filter_size_scale >= 1.\n      divisible_by: An `int` that ensures all inner dimensions are divisible by\n        this number.\n      stochastic_depth_drop_rate: A `float` of drop rate for drop connect layer.\n      flat_stochastic_depth_drop_rate: A `bool`, indicating that the stochastic\n        depth drop rate will be fixed and equal to all blocks.\n      regularize_depthwise: If Ture, apply regularization on depthwise.\n      use_sync_bn: If True, use synchronized batch normalization.\n      finegrain_classification_mode: If True, the model will keep the last layer\n        large even for small multipliers, following\n        https://arxiv.org/abs/1801.04381.\n      output_intermediate_endpoints: A `bool` of whether or not output the\n        intermediate endpoints.\n      **kwargs: Additional keyword arguments to be passed.\n    \"\"\"\n    if model_id not in SUPPORTED_SPECS_MAP:\n      raise ValueError('The MobileNet version {} '\n                       'is not supported'.format(model_id))\n\n    if filter_size_scale <= 0:\n      raise ValueError('filter_size_scale is not greater than zero.')\n\n    if output_stride is not None:\n      if model_id == 'MobileNetV1':\n        if output_stride not in [8, 16, 32]:\n          raise ValueError('Only allowed output_stride values are 8, 16, 32.')\n      else:\n        if output_stride == 0 or (output_stride > 1 and output_stride % 2):\n          raise ValueError('Output stride must be None, 1 or a multiple of 2.')\n\n    self._model_id = model_id\n    self._input_specs = input_specs\n    self._filter_size_scale = filter_size_scale\n    self._min_depth = min_depth\n    self._output_stride = output_stride","sourceCodeStart":1272,"sourceCodeEnd":1308,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/vision/modeling/backbones/mobilenet.py#L1272-L1308","documentation":"Error \"The MobileNet version {} is not supported\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/vision/modeling/backbones/mobilenet.py:1290 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported MobileNet version: 'mobilenet_v1', 'mobilenet_v2', 'mobilenet_v3_large', or 'mobilenet_v3_small'.","Check the backbone 'version' field in the model config for typos."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}