Week4 Assignment 1 Exercise 5

(Solution code removed, as posting it publicly is against the honour code of this community, regardless if it is correct or not)

receive this error and not sure how to fix it, please help

Hi @donaldpang541,

From the looks of it, your equation for Z seems to be incorrect.

Please recall, it is, z = Wx + b


P.S. sharing solution code publicly is prohibited in the community, hence, I have removed your code.

I believe you may be using the wrong variable name in these two locations in L_model_forward():

Hi Mubsi,

That’s not the issue because I was using the linear_forward from exercise 3 which forces you to use W,A + b

Hi TMosh,

May I ask what variable should I use, because the top line is " for ‘l’ in range(1, L):" which is why I use ‘l’

That piece of code is outside of the for-loop. So ‘l’ is not well-defined there.

Thanks man, I got it, problem was one line of the default code was missing, solved!

My bad, @donaldpang541.
Glad you were able to figure it out.

nah bro thanks a lot!