Perplexity in opennmt-tf

opennmt-tf

#1

I use opennmt-tf and train_and_eval. During traing, I get loss. During eval, I use external_evaluators to get BLEU and BLEU-detok scores. But I also want to get perplexity. How can I get perplexity?


(Guillaume Klein) #2

Hi,

The eval also reports the loss which is the cross entropy. So you can derive the perplexity from the loss:

perplexity = exp(loss)