This is a problem encountered in the “Building_your_Deep_Neural_Network_Step_by_Step” assignment.
At the end of the assignment, I was supposed to write a “update_parameters(params, grads, learning_rate)” function for gradient descent. I wrote the function as the following:
In the actual exception trace, note that you reference params on the RHS.
But in the actual code you show, you do a copy of params to parameters. So the code that you show should have worked, although it’s clearly not the code you were actually running when you got that exception. One thing to note is that just typing new code into a cell does not take effect until you actually click “Shift-Enter” to run that cell. Just calling the function again runs the old code. One easy way to make sure that “what you see is what you get” is to do “Kernel → Restart and Clear Output” and then “Cell → Run All”.
Oh, sorry, I was distracted by the params and parameters issues. The real bug is with grads: The key names there are not “W1” and “b1” but “dW1” and “db1”, right?