alecGraves / BVAE-tf

Disentangled Variational Auto-Encoder in TensorFlow / Keras (Beta-VAE)
The Unlicense
54 stars 13 forks source link

Is negative stddev a problem? #4

Closed alecGraves closed 5 years ago

alecGraves commented 5 years ago

I do not know if I should abs the stddev component of latent space or not... I think it breaks the loss function if it is negative?

# kl divergence:
latent_loss = -0.5 * K.mean(1 + stddev
                        - K.square(mean)
                        - K.exp(stddev), axis=-1)