Hello, I’m struggling to complete the conv_forward function in Excercise 1. The excercise includes almost no explanation about the cache variable I’m not calculating it correctly:
Z’s mean =
0.5511276474566768
Z[0,2,1] =
[-2.17796037 8.07171329 -0.5772704 3.36286738 4.48113645 -2.89198428
10.99288867 3.03171932]
cache_conv[0][1][2][3] =
[-5.262208534311856]
First Test: cache_conv[0][1][2][3] is incorrect. Expected: [-1.1191154, 1.9560789, -0.3264995, -1.34267579]
Your output: [-5.262208534311856]
I believe it wants something related to a_slice_prev but I’m a bit lost. Why does the assignment say nothing about this variable? Is it just so obvious it didn’t need any mention?
Thanks,
Matt
If this doesn’t help, please click my name and message your notebook as an attachment.
Hello, @hardkode,
I would like to first focus on the error, and share how I would investigate it.
First, it said First Test: cache_conv[0][1][2][3] is incorrect
, so cache_conv[0][1][2][3]
is the thing I am going to track from:
In step 4, I find that the wrong element comes from A_prev
which I know, after I read the code template provided to us again, is not supposed to be changed. Therefore, if my solution is correct, cache_conv[0][1][2][3]
should print whatever randomly initialized in step 6. To verify this thought, I did the following which gives exactly what’s expected in your error message.

Therefore, if I were you, the first thing I would check would be where and why I had modified the content of A_prev
. I can easily find it with the help of my Chrome’s search feature to show all appearance of A_prev
. 
I can’t speak for the course team, and the following is only my personal opinion. All learners can make errors in their work (which is not a bad thing), only there is no way we can confine how learners make them, so it is not always possible to provide relevant hint to everyone in prior. While I think one should struggle a while because debugging is a core skill that one learns when coding, if it takes too long, we can discuss here

Cheers,
Raymond
1 Like