vae-lagging-encoder
vae-lagging-encoder copied to clipboard
Regarding NLL loss, Recon loss and PPL.
Hi Junxian,
Thank you so much for your paper and code, it helps me a lot.
But I am a little confused by the loss calculation here in test method in test.py.
**test_loss = (report_rec_loss + report_kl_loss) / report_num_sents
nll = (report_kl_loss + report_rec_loss) / report_num_sents
kl = report_kl_loss / report_num_sents
ppl = np.exp(nll * report_num_sents / report_num_words)**
what I saw and did before was rec_loss as nll_loss (it is calculated using nll_loss) and ppl is calculated purely on rec_loss (nll_loss).
But I see you use kl in the term here, so I wonder what is the intuition here and it seems test_loss is the same as nll?
Any explanations would be much appreciated.
Thank you in advance.