2

The VAE loss is composed of two terms:

  1. Reconstruction loss
  2. KLD loss

in the implementation there is -0.5 applied to KLD loss. Kindly let me know what is this -0.5

amir
  • 21
  • 1

1 Answers1

0

It's the (-1/2) taken out of the parentheses in KL divergence expression stated here. Basically, in VAE, $\mu_2=0,\sigma_2=1$. And, this expression is summed up for each latent dimension with $\mu_i, \sigma_i$.

gunes
  • 49,700
  • 3
  • 39
  • 75