I am having trouble in C3W1 Assignment - perplexity calculation. I passed unit test first 8 examples, but fail 9-th example. I see the preds dimension is 4 while tartget is 3:
preds.shape (2, 1, 7, 3)
target.shape (2, 7)
I tried tf.squeeze(preds)
preds shape after squeeze: (2, 7, 3)
Still get the error:
AssertionError: Fail in Example 9. Batch of 2. Expected -0.31333333427707355 but got -0.27916666759798925