jaanli / variational-autoencoder

Variational autoencoder implemented in tensorflow and pytorch (including inverse autoregressive flow)
https://jaan.io/what-is-variational-autoencoder-vae-tutorial/
MIT License
1.15k stars 256 forks source link

Regarding the loss function #28

Closed leviszhang closed 3 years ago

leviszhang commented 3 years ago

Hi, thank you for the nice implementation. Are there any references to the loss function "log_p_x_and_z - log_q_z" used in the Pytorch implementation? Both the two logarithm terms refer to a "NormalLogProb" class. It seems quite different from the one in the paper "Tutorial: Deriving the Standard Variational Autoencoder (VAE) Loss Function". Thank you for your time reading this.

jaanli commented 3 years ago

Yes! I derive it here: https://jaan.io/what-is-variational-autoencoder-vae-tutorial/ - feel free to follow up if you have questions :)