Week 4 Exercise 9 almost done

Hello,
My code is almost done I just have an error stating that my output doesn’t contain correct values.
I entered the dA+str(l+1) in the loop argument as stated in the question. entered the cache values as follows:

for sigmoid part:
current_cache = caches[L-1]

for relu part in loop:
current_cache = caches[l]

can someone explain where is my fault?

Hi @Murat_Bayraktar
In this case, it’s not easy to find the error only by checking the error message, but I am guessing if you have an inverted signal, like the dAL expression. Note that the output values are very different but also inverted signals when compared with the expected output.
Keep learning!

dear @carlosrl,

I really appreciate your reply and would be glad if you help according to my following input. I reviewed my code and couldn’t find my mistake, unfortunately.

(Edited)

Have a nice day

You have the activation functions reversed: it is relu for the hidden layers and sigmoid for the output layer, right? Remember that this is backward propagation, so we are going … wait for it … backwards. :nerd_face:

1 Like

Sometimes we focus on the hard stuff and get blinded on the easy parts :smiley:
Thanks for the help!

Believe me, I know the feeling. I can look right at the bug and not see it sometimes. Onward! :nerd_face: