Learn R Programming

shapr (version 1.0.4)

vaeac_kl_normal_normal: Compute the KL Divergence Between Two Gaussian Distributions.

Description

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.

Usage

vaeac_kl_normal_normal(p, q)

Value

The KL divergence between the two Gaussian distributions.

Arguments

p

A torch::distr_normal() object.

q

A torch::distr_normal() object.

Author

Lars Henry Berge Olsen