(self)
return math.exp(min(self.loss / self.n_words, 100))
compute perplexity
compute perplexity
compute perplexity
def ppl(self):
        """ compute perplexity """
        return math.exp(min(self.loss / self.n_words, 100))
def ppl ( self ) : return math . exp ( min ( self . loss / self . n_words , 100 ) )