@kullback_leibler.RegisterKL(Laplace, Laplace)<EOL>def _kl_laplace_laplace(a, b, name=None):
with tf.name_scope(name or "<STR_LIT>"):<EOL><INDENT>distance = tf.abs(a.loc - b.loc)<EOL>ratio = a.scale / b.scale<EOL>return (-tf.math.log(ratio) - <NUM_LIT:1> + distance / b.scale +<EOL>ratio * tf.exp(-distance / a.scale))<EOL><DEDENT>
Calculate the batched KL divergence KL(a || b) with a and b Laplace.

    Args:
      a: instance of a Laplace distribution object.
      b: instance of a Laplace distribution object.
      name: (optional) Name to use for created operations.
        default is "kl_laplace_laplace".

    Returns:
      Batchwise KL(a || b)