C3W1 Log perplexity, All tests passed in unit test, but getting 0 during grading

For the log perplexity, I have completed the code as attached in the picture and I passed all the unit tests. But whenever I submit I get 0 for this assignment but get full marks for other exercises. It shows the fault like this "There was an error grading your submission. Details: operands could not be broadcast together with shapes (2,7) (2,) " I can not find out where did I make the error. Please help.

N.B. I have tried deleting the files, then rebooting and updating the lab as suggested in another topic. It did not work.


hi @Farhan_Pervez_Ahmed

Please see below thread if that helps you

Regards
DP

Thanks, it helped. I expected the inputs of the function to always have the same shape, which was not the case.

1 Like

Actually what I meant is, I expected the inputs to be 3d data. But during grading probably there is a test case where the input data have dimension of more than three.
There is probably no such test case scenerio during unit test, so I could not identify the problem earlier.

1 Like

instructions before the grade cell had mentioned this

1 Like