I created a language model with Keras LSTM and now I want to assess wether it's good so I want to calculate perplexity.
What is the best way to calc perplexity of a model in Python?
I created a language model with Keras LSTM and now I want to assess wether it's good so I want to calculate perplexity.
What is the best way to calc perplexity of a model in Python?
I've come up with two versions and attached their corresponding source, please feel free to check the links out.