[Solved] Updating dictionary in python, during gradient descent


Accessing values in a dictionary requires brackets [], not parentheses () (see this answer. From the code you’ve given us, it looks like grads("db" + str(l+1)) needs to be changed to grads["db" + str(l+1)] to fix your error.

A few notes on style:

solved Updating dictionary in python, during gradient descent