def _kl_uniform_uniform(a, b, name=None):
  """
  """
  with tf.name_scope(name or "kl_uniform_uniform"):
    # Consistent with
    # http://www.mast.queensu.ca/~communications/Papers/gil-msc11.pdf, page 60
    # Watch out for the change in conventions--they use 'a' and 'b' to refer to
    # lower and upper bounds respectively there.
    final_batch_shape = distribution_util.get_broadcast_shape(
        a.low, b.low, a.high, b.high)
    dtype = dtype_util.common_dtype(
        [a.low, a.high, b.low, b.high], tf.float32)
    return tf.where((b.low <= a.low) & (a.high <= b.high),
                    tf.math.log(b.high - b.low) - tf.math.log(a.high - a.low),
                    tf.broadcast_to(
                        dtype_util.as_numpy_dtype(dtype)(np.inf),
                        final_batch_shape))