timbmg / VAE-CVAE-MNIST

Variational Autoencoder and Conditional Variational Autoencoder on MNIST in PyTorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About the KLD loss term

YMBetta opened this issue · comments

In the original paper, loss=recon_loss - KLD. But in your code, loss=recon_loss + KLD. I aslo found your code work in both cases. Can you please tell the idea about the loss in your code?

Your implementation is consistent with origin paper, I‘m’ misunderstanding it!