{"record":{"id":"ec13f8cca3cc5133","repo":"tensorflow/models","slug":"pointpillars-model-needs-attribute-heads","errorCode":null,"errorMessage":"PointPillars model needs attribute heads.","messagePattern":"PointPillars model needs attribute heads\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/pointpillars/modeling/models.py","lineNumber":72,"sourceCode":"    self._backbone = backbone\n    self._decoder = decoder\n    self._head = head\n    self._detection_generator = detection_generator\n    self._min_level = min_level\n    self._max_level = max_level\n    self._image_size = image_size\n    self._anchor_sizes = anchor_sizes\n\n  def generate_outputs(\n      self,\n      raw_scores: Dict[str, tf.Tensor],\n      raw_boxes: Dict[str, tf.Tensor],\n      raw_attributes: Dict[str, Dict[str, tf.Tensor]],\n      image_shape: Optional[tf.Tensor] = None,\n      anchor_boxes: Optional[Mapping[str, tf.Tensor]] = None,\n      generate_detections: bool = False) -> Mapping[str, Any]:\n    if not raw_attributes:\n      raise ValueError('PointPillars model needs attribute heads.')\n    # Clap heading to [-pi, pi]\n    if 'heading' in raw_attributes:\n      raw_attributes['heading'] = utils.clip_heading(raw_attributes['heading'])\n\n    outputs = {\n        'cls_outputs': raw_scores,\n        'box_outputs': raw_boxes,\n        'attribute_outputs': raw_attributes,\n    }\n    # Cast raw prediction to float32 for loss calculation.\n    outputs = tf.nest.map_structure(lambda x: tf.cast(x, tf.float32), outputs)\n    if not generate_detections:\n      return outputs\n\n    if image_shape is None:\n      raise ValueError('Image_shape should not be None for evaluation.')\n    if anchor_boxes is None:\n      # Generate anchors if needed.","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/pointpillars/modeling/models.py#L54-L90","documentation":"Requirement check in PointPillars.generate_outputs: the model stores raw attribute predictions in raw_attributes and this ValueError fires when the dict is empty — i.e., the head was configured without attribute heads, which the detection post-processing requires.","triggerScenarios":"Thrown at official/projects/pointpillars/modeling/models.py:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure the head with at least one attribute head (e.g. heading)","Ensure the head factory actually built the configured attribute heads","Check the checkpoint/config used matches a PointPillars variant with attribute heads"],"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"}