vaeac_kl_normal_normal: Compute the KL Divergence Between Two Gaussian Distributions.

View source: R/approach_vaeac_torch_modules.R

vaeac_kl_normal_normalR Documentation

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)

Arguments

p

A torch::distr_normal() object.

q

A torch::distr_normal() object.

Value

The KL divergence between the two Gaussian distributions.

Author(s)

Lars Henry Berge Olsen


NorskRegnesentral/shapr documentation built on April 19, 2024, 1:19 p.m.