def test_assign_empty_groundtruths(self):
    """Tests the assign_offset_targets function with empty inputs."""
    def graph_fn():
      box_batch = [
          tf.zeros((0, 4), dtype=tf.float32),
      ]

      offset_batch = [
          tf.zeros((0, 2), dtype=tf.float32),
      ]

      match_flag_batch = [
          tf.zeros((0), dtype=tf.float32),
      ]

      assigner = targetassigner.CenterNetTemporalOffsetTargetAssigner(4)
      indices, temporal_offset, weights = assigner.assign_temporal_offset_targets(
          80, 80, box_batch, offset_batch, match_flag_batch)
      return indices, temporal_offset, weights
    indices, temporal_offset, weights = self.execute(graph_fn, [])
    self.assertEqual(indices.shape, (0, 3))
    self.assertEqual(temporal_offset.shape, (0, 2))
    self.assertEqual(weights.shape, (0,))
Tests the assign_offset_targets function with empty inputs.
inference_api/src/main/object_detection/core/target_assigner_test.py