[Solved] Updating dictionary in python, during gradient descent

[ad_1]

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:

[ad_2]

solved Updating dictionary in python, during gradient descent