Course 4 Assignment 1 Exercise 5 conv_backward: Wrong Values for dA

Wrong Values for dA

I had passed the type and shape test, but got stuck at the mean value.

This is the feedback.

The initialization and for loop sections are shown in the following figure.

{moderator edit - solution code removed}

I had tried initializing the value by multiplying 0.01 or 0.0001. However, it never work. Could anyone help me? Thanks for your time in advance!

Everything you show looks correct to me. But you don’t show the parts involving the padding. You have to add it in the initialization and then remove it at the end to get the dA value.

Hi, Paul. Thanks for your reply! Yes, I did pad dA_prev after initialization, and also pad A_prev with zero by applying the function zero_pad. But I am a little confused about removing the padding at the end? Could you explain more about the removing part?

Thank you so much! Paul. I got it!

Yes, it was explained in the comments right at that point in the code and they pretty much wrote out the code for you. Glad to hear you were able to get that to work.