vae_loss_independent: A custom loss function for a VAE learning a standard normal...

View source: R/loss_functions.R

vae_loss_independentR Documentation

A custom loss function for a VAE learning a standard normal distribution

Description

A custom loss function for a VAE learning a standard normal distribution

Usage

vae_loss_independent(encoder, kl_weight, rec_dim)

Arguments

encoder

the encoder model of the VAE, used to obtain z_mean and z_log_var from inputs

kl_weight

weight for the KL divergence term

rec_dim

the number of nodes in the input/output of the VAE

Value

returns a function whose parameters match keras loss format


ML2Pvae documentation built on May 23, 2022, 9:05 a.m.