tensorflow/models · error
Invalid dimensions for box data: {}
Error message
Invalid dimensions for box data: {} What it means
Error "Invalid dimensions for box data: {}" thrown in tensorflow/models.
Source
Thrown at official/projects/centernet/ops/box_list.py:68
except AttributeError:
return dim
class BoxList(object):
"""Box collection."""
def __init__(self, boxes):
"""Constructs box collection.
Args:
boxes: a tensor of shape [N, 4] representing box corners
Raises:
ValueError: if invalid dimensions for bbox data or if bbox data is not in
float32 format.
"""
if len(boxes.get_shape()) != 2 or boxes.get_shape()[-1] != 4:
raise ValueError('Invalid dimensions for box data: {}'.format(
boxes.shape))
if boxes.dtype != tf.float32:
raise ValueError('Invalid tensor type: should be tf.float32')
self.data = {'boxes': boxes}
def num_boxes(self):
"""Returns number of boxes held in collection.
Returns:
a tensor representing the number of boxes held in the collection.
"""
return tf.shape(self.data['boxes'])[0]
def num_boxes_static(self):
"""Returns number of boxes held in collection.
This number is inferred at graph construction time rather than run-time.
View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/centernet/ops/box_list.py:68 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24).
Data as JSON: /api/errors/5fc68cb2ab98a60a.
Report an issue: GitHub.