{"record":{"id":"b2c746b021c605ab","repo":"tensorflow/models","slug":"image-shape-should-not-be-none-for-evaluation","errorCode":null,"errorMessage":"Image_shape should not be None for evaluation.","messagePattern":"Image_shape should not be None for evaluation\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/pointpillars/modeling/models.py","lineNumber":88,"sourceCode":"      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.\n      anchor_boxes = utils.generate_anchors(\n          self._min_level,\n          self._max_level,\n          self._image_size,\n          self._anchor_sizes,\n      )\n      for l in anchor_boxes:\n        anchor_boxes[l] = tf.tile(\n            tf.expand_dims(anchor_boxes[l], axis=0),\n            [tf.shape(image_shape)[0], 1, 1, 1])\n\n    # Generate detected boxes.\n    if not self._detection_generator.get_config()['apply_nms']:\n      raise ValueError('An NMS algorithm is required for detection generator')\n    detections = self._detection_generator(raw_boxes, raw_scores,\n                                           anchor_boxes, image_shape,","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/pointpillars/modeling/models.py#L70-L106","documentation":"Error \"Image_shape should not be None for evaluation.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/pointpillars/modeling/models.py:88 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"}