{"record":{"id":"1caca25e6948a454","repo":"tensorflow/models","slug":"backbone-min-level-should-be-less-or-equal-to-fpn-1caca2","errorCode":null,"errorMessage":"Backbone min level should be less or equal to FPN min level","messagePattern":"Backbone min level should be less or equal to FPN min level","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/vision/modeling/decoders/fpn.py","lineNumber":199,"sourceCode":"          axis=bn_axis,\n          momentum=norm_momentum,\n          epsilon=norm_epsilon,\n          synchronized=use_sync_bn,\n          name=f'norm_{level}')(\n              feats[str(level)])\n\n    self._output_specs = {\n        str(level): feats[str(level)].get_shape()\n        for level in range(min_level, max_level + 1)\n    }\n\n    super().__init__(inputs=inputs, outputs=feats, **kwargs)\n\n  def _build_input_pyramid(self, input_specs: Mapping[str, tf.TensorShape],\n                           min_level: int):\n    assert isinstance(input_specs, dict)\n    if min(input_specs.keys()) > str(min_level):\n      raise ValueError(\n          'Backbone min level should be less or equal to FPN min level')\n\n    inputs = {}\n    for level, spec in input_specs.items():\n      inputs[level] = tf_keras.Input(shape=spec[1:])\n    return inputs\n\n  def get_config(self) -> Mapping[str, Any]:\n    return self._config_dict\n\n  @classmethod\n  def from_config(cls, config, custom_objects=None):\n    return cls(**config)\n\n  @property\n  def output_specs(self) -> Mapping[str, tf.TensorShape]:\n    \"\"\"A dict of {level: TensorShape} pairs for the model output.\"\"\"\n    return self._output_specs","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/vision/modeling/decoders/fpn.py#L181-L217","documentation":"Error \"Backbone min level should be less or equal to FPN min level\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/vision/modeling/decoders/fpn.py:199 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the backbone min_level to a value less than or equal to the FPN min_level.","Adjust the FPN min_level/max_level or the backbone levels so the ranges are compatible."],"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"}