wiseodd / controlled-text-generation

Reproducing Hu, et. al., ICML 2017's "Toward Controlled Generation of Text"
BSD 3-Clause "New" or "Revised" License
242 stars 63 forks source link

kl_loss #8

Closed nwy2010 closed 6 years ago

nwy2010 commented 6 years ago

https://github.com/wiseodd/controlled-text-generation/blob/a09ad1d9272b9e40fc0084ad1779a6d44f07862d/ctextgen/model.py#L242

Why is the kl_loss calculated like this?

wiseodd commented 6 years ago

Hi, please refer to the VAE paper by Kingma & Welling, appendix B.