Hello All
I was working on the " Exercise 5 - log_perplexity" of assignment w1 " Deep N-grams". My code can not pass the unit test:
Here is my code
{moderator edit: code removed}
Just for information, I tried to use .reshape(-1,1) in the denominator ( np.sum(log_p, axis=1) / np.sum(non_pad,axis=1)), but it trigger another error in unit test. Could anyone help me out?