{"record":{"id":"f91119ec17802df0","repo":"tensorflow/models","slug":"unsupported-datatype-used-in-ground-truth-builder","errorCode":null,"errorMessage":"Unsupported datatype used in ground truth builder only {float16, bfloat16, or float32}","messagePattern":"Unsupported datatype used in ground truth builder only (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"official/projects/centernet/ops/target_assigner.py","lineNumber":295,"sourceCode":"        other entires are 0\n      'box_mask': `Tensor` of shape [max_num_instances], where the first\n        num_boxes entries are 1. All other entires are 0\n      'box_indices': `Tensor` of shape [max_num_instances, 2], where the first\n        num_boxes entries contain the y-center and x-center of a valid box.\n        These are used to extract the regressed box features from the\n        prediction when computing the loss\n\n  Raises:\n    Exception: if datatype is not supported.\n  \"\"\"\n  if dtype == 'float16':\n    dtype = tf.float16\n  elif dtype == 'bfloat16':\n    dtype = tf.bfloat16\n  elif dtype == 'float32':\n    dtype = tf.float32\n  else:\n    raise Exception(\n        'Unsupported datatype used in ground truth builder only '\n        '{float16, bfloat16, or float32}')\n\n  # Get relevant bounding box and class information from labels\n  # only keep the first num_objects boxes and classes\n  num_objects = labels['groundtruths']['num_detections']\n  # shape of labels['boxes'] is [max_num_instances, 4]\n  # [ymin, xmin, ymax, xmax]\n  boxes = tf.cast(labels['boxes'], dtype)\n  # shape of labels['classes'] is [max_num_instances, ]\n  classes = tf.cast(labels['classes'] - class_offset, dtype)\n\n  # Compute scaling factors for center/corner positions on heatmap\n  # input_size = tf.cast(input_size, dtype)\n  # output_size = tf.cast(output_size, dtype)\n  input_h, input_w = input_size[0], input_size[1]\n  output_h, output_w = output_size[0], output_size[1]\n","sourceCodeStart":277,"sourceCodeEnd":313,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/centernet/ops/target_assigner.py#L277-L313","documentation":"Error \"Unsupported datatype used in ground truth builder only {float16, bfloat16, or float32}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/centernet/ops/target_assigner.py:295 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"}