vaeac_kl_normal_normal function

Compute the KL Divergence Between Two Gaussian Distributions.

Compute the KL Divergence Between Two Gaussian Distributions.

Computes the KL divergence between univariate normal distributions using the analytical formula, see https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence#Multivariate_normal_distributions.

vaeac_kl_normal_normal(p, q)

Arguments

  • p: A torch::distr_normal() object.
  • q: A torch::distr_normal() object.

Returns

The KL divergence between the two Gaussian distributions.

Author(s)

Lars Henry Berge Olsen