I got this error after running the Optimize function, yet when i run the propagate function there is no problem, all the tests are passed, so i don’t understand why when i call the propagate function in the optimize function it raises an error…
@bousek.dorian the code I see looks okay. Does it give you this error on the very first attempt of the loop in the optimize function, or does it run a few times first ?
Perhaps, in optimize() in the:
# update rule (≈ 2 lines of code)
# w = ...
# b = ...
# YOUR CODE STARTS HERE
You are doing something that inadvertently alters the dimensions of w ?
Well when i add a counter in the code it looks like it loops 2 times then it raises the error…So maybe It’s the way i computed propagate that causes the error?
Here’s my propagate function code tho, It might help you to understand better what i did.
(By the way i coded the “cost” with basic multiplications and not dot products coz it raised me another error of shape when i tried to)
I’ll bet your error is in the “update parameters” code in optimize. Please check the logic there compared to the math formula. You are probably using dw to update b.
Yes you was right !
It was a simply bad error in my code; when i update b i was using “w - learning_rate” instead of b…
Thank’s yall for your precious help, next time I will take the time to clearly understand the error to debug it correclty.
Again thank you so much ! And sorry for the screen capture of the code, won’t happen again.