import tensorflow as tf

    inputs = tf.random.uniform(
        [100, 8], minval=-10, maxval=10.0, dtype=tf.float32)
    centers = tf.random.uniform(
        [5, 8], minval=-10, maxval=10.0, dtype=tf.float32)
    distances1 = isu.inputs_distances_to_centers(inputs, centers)
    num_centers = tf.shape(centers)[0]
    inputs_reshaped = tf.tile(tf.expand_dims(inputs, axis=1),
                              tf.stack([1, num_centers, 1]))
    distances2 = tf.reduce_sum(tf.square(inputs_reshaped - centers), axis=2)
    self.assertAllClose(distances1.numpy(), distances2.numpy(), atol=0.001)

  def test_pairwise_iou_matrix(self):
    mask0 = tf.constant([[1, 0],
                         [0, 1]], dtype=tf.float32)
    mask1 = tf.constant([[1, 1],
                         [0, 1]], dtype=tf.float32)
