tensorflow/models · error · ValueError
Attribute type {head.type} not supported.
Error message
Attribute type {head.type} not supported. What it means
Error "Attribute type {head.type} not supported." thrown in tensorflow/models.
Source
Thrown at official/projects/pointpillars/tasks/pointpillars.py:182
dataset = reader.read(input_context=input_context)
return dataset
def compute_attribute_losses(
self,
outputs: Mapping[str, Any],
labels: Mapping[str, Any],
box_sample_weight: tf.Tensor) -> Mapping[str, float]:
"""Computes attribute loss."""
att_loss_fn = tf_keras.losses.Huber(
self.task_config.losses.huber_loss_delta,
reduction=tf_keras.losses.Reduction.SUM)
losses = {}
total_loss = 0.0
for head in self._attribute_heads:
if head.type != 'regression':
raise ValueError(f'Attribute type {head.type} not supported.')
y_true_att = loss_utils.multi_level_flatten(
labels['attribute_targets'][head.name], last_dim=head.size)
y_pred_att = loss_utils.multi_level_flatten(
outputs['attribute_outputs'][head.name], last_dim=head.size)
if head.name == 'heading':
# Direction aware loss, wrap the delta angle to [-pi, pi].
# Otherwise for a loss that is symmetric to direction (i.e., heading 0
# and pi are the same), we use a tf.sin transform.
delta = utils.wrap_angle_rad(y_pred_att - y_true_att)
loss = att_loss_fn(
y_true=tf.zeros_like(delta),
y_pred=delta,
sample_weight=box_sample_weight)
else:
loss = att_loss_fn(
y_true=y_true_att,
y_pred=y_pred_att,View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/pointpillars/tasks/pointpillars.py:182 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/f609df6b327e6ae0.
Report an issue: GitHub.