Compute the Perplexity