pytorch-seq2seq
pytorch-seq2seq copied to clipboard
NLL & Perplexity Loss
Hi, It seems that Perplexity is normalized twice & norm_term of NLLLoss should be masked out as well.
Is this issue still open? I checked the code and didn't see the problems mentioned. Is it fixed?
@lethienhoa Yes, there need to be updated about NLLLoss norm term. But I am also confused why loss is not divided in terms of norm_term before doing loss.backward()? https://github.com/IBM/pytorch-seq2seq/blob/f146087a9a271e9b50f46561e090324764b081fb/seq2seq/trainer/supervised_trainer.py#L63