Compute the perplexity of a language model from its mean negative log-likelihood per token (natural log): exp(mean NLL).
Implement solve(mean_nll).
Returns. Return a float, at least 1 for non-negative NLL.
Example 1
Input:
solve(1.0)
Output:
2.718282
Example 2
Input:
solve(0.0)
Output:
1.0
No results yet
Run your code to check it against the examples, or submit to run every test.