Open fciannella opened 6 years ago
+1
https://github.com/tensorflow/tensor2tensor/issues/212 , excuse , the url is not arrived , could you help to give another way or url to show the method to computer perplexity of a new sentence , thanks .
I have found a score_file
flag in the t2t_decoder.py script: https://github.com/tensorflow/tensor2tensor/blob/abbd929558dd29115acc9d0f035f1efddb45566d/tensor2tensor/bin/t2t_decoder.py#L58
It calculates perplexity for each line in a file.
Description
This is a question, not an issue.
I want to set up a language model using the 1B words. These are my training parameters:
And this is how I train and decode:
When I decode I only get a new sentence. But I would like to get the perplexity of the input sentence. Is there a way to do it?
Environment information
Also I see that this was already asked before (#212 ), but in the answer there is a pointer to a test case that is no more available.