Taking the course on coursera-platform.
My code for conv_forward is passing the first but not the second test. It tells me to make sure to include stride in my calculation. The only place I found to include it is in the calculation for n_H and n_W. Do I need to use it somewhere else?
Also, I’m confused as to why a_slice_prev is defined in the innermost loop if it uses all of the channels and not just c. (I’m assuming I need them all because the hint said it was 3-D). Output:
Z’s mean = 0.5329033220060434 Z[0,2,1] = [-0.05723279 0.03991888 -6.24285862 0.53960581 -5.04059676 6.96991358 3.69509379 -0.20955895] cache_conv[0][1][2][3] = [-1.1191154 1.9560789 -0.3264995 -1.34267579] First Test: Z’s mean is incorrect. Expected: 0.5511276474566768 Your output: 0.5329033220060434 . Make sure you include stride in your calculation First Test: Z[0,2,1] is incorrect. Expected: [-2.17796037, 8.07171329, -0.5772704, 3.36286738, 4.48113645, -2.89198428, 10.99288867, 3.03171932] Your output: [-0.05723279 0.03991888 -6.24285862 0.53960581 -5.04059676 6.96991358 3.69509379 -0.20955895] Make sure you include stride in your calculation