Error in gradiant_check_n

While implementing gradiant_check_n, it throws an error while computing J_plus[i] saying “cannot copy sequence with size 2 to array axis with dimension 1”. Can anyone please help with it.

The coding errors have been fixed by @Aditya. There are no problems in the notebook.

Good luck with the rest of the course! :slight_smile:

I have the same problem. Can’t understand why this error is coming up when the code given below works perfectly fine

I’m getting the same problem as well. I check the bits that go into line 39, and the values seem correct. I just don’t understand the error message. What does that mean?

I am also getting this error and cannot seem to find the cause

Hint: The solution to this problem can be determined by reviewing the expected output of the pre-written forward_propagation_n(X, Y, parameters) function. (I think that this hint is not against community guidelines but i can remove it if it is)


It’s a good hint, @kdbassjr. Thank you.

I haven’t heard back from @archit. I hope he was able to fix it.

@vanbrackin’s case was a bit different. You have to be careful not to confuse l with layers_dims.

Good luck with the rest of the course!