Course 1 Week 4 Assignment 2 Passed 2 tests but not the last

Hello. I am stuck on this part in Assignment 2 for Week 4. I can successfully pass the first two tests but not the last one. Could someone please help? I can also share the code I have if that will help!

Hi, the first two tests check the datatype and the shape. The error you are having is related to the output of your function, in particular, the parameters (W1, b1, W2 and b2).

parameters is calculated using a given function so either there is a problem with the initialization of parameters or the calculation of grads. I would suggest you check how these are calculated and ensure that you’re not hardcoding any input to the functions e.g. learning_rate, use the inputs passed to two_layer_model function.

1 Like

I figured it out! Thank you so much!