{"record":{"id":"5fc68cb2ab98a60a","repo":"tensorflow/models","slug":"invalid-dimensions-for-box-data","errorCode":null,"errorMessage":"Invalid dimensions for box data: {}","messagePattern":"Invalid dimensions for box data: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"official/projects/centernet/ops/box_list.py","lineNumber":68,"sourceCode":"  except AttributeError:\n    return dim\n\n\nclass BoxList(object):\n  \"\"\"Box collection.\"\"\"\n\n  def __init__(self, boxes):\n    \"\"\"Constructs box collection.\n\n    Args:\n      boxes: a tensor of shape [N, 4] representing box corners\n\n    Raises:\n      ValueError: if invalid dimensions for bbox data or if bbox data is not in\n          float32 format.\n    \"\"\"\n    if len(boxes.get_shape()) != 2 or boxes.get_shape()[-1] != 4:\n      raise ValueError('Invalid dimensions for box data: {}'.format(\n          boxes.shape))\n    if boxes.dtype != tf.float32:\n      raise ValueError('Invalid tensor type: should be tf.float32')\n    self.data = {'boxes': boxes}\n\n  def num_boxes(self):\n    \"\"\"Returns number of boxes held in collection.\n\n    Returns:\n      a tensor representing the number of boxes held in the collection.\n    \"\"\"\n    return tf.shape(self.data['boxes'])[0]\n\n  def num_boxes_static(self):\n    \"\"\"Returns number of boxes held in collection.\n\n    This number is inferred at graph construction time rather than run-time.\n","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/centernet/ops/box_list.py#L50-L86","documentation":"Error \"Invalid dimensions for box data: {}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/centernet/ops/box_list.py:68 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"}