{"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":"Error \"PointPillars model needs attribute heads.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/pointpillars/modeling/models.py:72 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"}