Your code returns a grads dictionary that does not contain the key ‘dA1’. Why it does that, I can’t say. That’s your job to figure out. Try adding some print statements to your code to show each time you add an element to the grads dictionary. Perhaps there is something wrong with your loop logic.
Please realize that every student’s notebooks are private to their account, so no-one else can just magically reach in and debug your code for you.
Hello @samuelcesarino
Try printing the grads ‘keys’. And then you will figure out why ‘dA1’ is missing.
Then recheck the line where you are adding keys & values into the grads dictionary.