{"record":{"id":"9e78e92fe63d8c7f","repo":"tensorflow/models","slug":"backbone-min-level-should-be-less-or-equal-to-fpn","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/projects/maskconver/modeling/fpn.py","lineNumber":213,"sourceCode":"          bias_regularizer=bias_regularizer,\n      )(feats_in)\n\n    # Apply batch norm layers.\n    for level in range(min_level, max_level + 1):\n      feats[str(level)] = norm_layer()(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":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/maskconver/modeling/fpn.py#L195-L231","documentation":"Error \"Backbone min level should be less or equal to FPN min level\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/maskconver/modeling/fpn.py:213 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}