Hey @paulinpaloalto I tried to get the shape of those matrices, and their output are as follows.
shape of Z (2, 3, 4, 8)
shape of A_prev_pad (2, 7, 9, 4)
shape of a_prev_pad (7, 9, 4)
shape of a_slice_prev (3, 3, 4)
Z[0,0,0,0] 0.0
Z[1,2,3,7] 0.4427056509973153
Z's mean =
0.5151827378782476
Z[0,2,1] =
[0. 0. 0. 0. 0. 0. 0. 0.]
cache_conv[0][1][2][3] =
[-1.1191154 1.9560789 -0.3264995 -1.34267579]
shape of Z (2, 9, 11, 8)
shape of A_prev_pad (2, 11, 13, 4)
shape of a_prev_pad (11, 13, 4)
shape of a_slice_prev (3, 3, 4)
Z[0,0,0,0] 0.0
Z[1,2,3,7] -0.19892396465345275
shape of Z (2, 2, 3, 8)
shape of A_prev_pad (2, 5, 7, 4)
shape of a_prev_pad (5, 7, 4)
shape of a_slice_prev (3, 3, 4)
also about your stride
implementation concern, I multiplied it with h and w like this
vert_start = h*stride
horiz_start = w*stride
I don’t know if I implemented this right?