{"record":{"id":"c95ff8e0f66258fa","repo":"tensorflow/models","slug":"attribute-head-type-not-supported","errorCode":null,"errorMessage":"Attribute head type {} not supported.","messagePattern":"Attribute head type (.+?) not supported\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/qat/vision/modeling/heads/dense_prediction_heads.py","lineNumber":268,"sourceCode":"        # Build the final prediction layer.\n        att_predictor_kwargs = {\n            'filters':\n                (att_size * self._config_dict['num_anchors_per_location']),\n            'kernel_size': 3,\n            'padding': 'same',\n            'bias_initializer': tf.zeros_initializer(),\n            'bias_regularizer': self._config_dict['bias_regularizer'],\n        }\n        if att_type == 'regression':\n          att_predictor_kwargs.update(\n              {'bias_initializer': tf.zeros_initializer()})\n        elif att_type == 'classification':\n          att_predictor_kwargs.update({\n              'bias_initializer':\n                  tf.constant_initializer(-np.log((1 - 0.01) / 0.01))\n          })\n        else:\n          raise ValueError(\n              'Attribute head type {} not supported.'.format(att_type))\n\n        if not self._config_dict['use_separable_conv']:\n          att_predictor_kwargs.update({\n              'kernel_initializer':\n                  tf_keras.initializers.RandomNormal(stddev=1e-5),\n              'kernel_regularizer':\n                  self._config_dict['kernel_regularizer'],\n          })\n\n        self._att_predictors[att_name] = conv_op(\n            name='{}_attributes'.format(att_name), **att_predictor_kwargs)\n\n    super().build(input_shape)\n\n  def call(self, features: Mapping[str, tf.Tensor]):\n    \"\"\"Forward pass of the RetinaNet quantized head.\n","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/qat/vision/modeling/heads/dense_prediction_heads.py#L250-L286","documentation":"Error \"Attribute head type {} not supported.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/qat/vision/modeling/heads/dense_prediction_heads.py:268 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"}