C2_W4_Exercise4

I got : 14 tests passed. 2 tests failed due to b1. Any advice?

Of course, the generic advice would be “Check the code for computing the b1 gradients”. But maybe we can use again the adage “believe the error message” and try to learn from it what we can.

Well, notice that the actual values you “Got” are exactly 2x the values that were “Expected”. It seems like that would be a useful clue about the nature of the error you are looking for. :laughing:

Thanks for the suggestion. After I multiplied the expression for the gradient of b1 by 1/2, I can pass all tests. However, I did not find 1/2 in the formula. Any advice?

There must be something else wrong with your code if you have to compensate in that way.

Could I send my code to you via private message to review?

I just sent you a DM about that.

1 Like