Hello !
I am getting a following error:
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
in
6 “stride”: 2}
7
----> 8 Z, cache_conv = conv_forward(A_prev, W, b, hparameters)
9 print(“Z’s mean =\n”, np.mean(Z))
10 print(“Z[0,2,1] =\n”, Z[0, 2, 1])
in conv_forward(A_prev, W, b, hparameters)
93
94 for c in range(n_C):
—> 95 a_slice_prev = A_prev_pad[vert_start:vert_end, horiz_start:horiz_end, :]
96 weights = W[:, :, :, c]
97 biases = b[:, :, :, c]
IndexError: too many indices for array.
The funny thing is that I tried to debug and printed out intermediate values, it passes 96 times through all loops, therefore getting 96 values for output matrix Z. I guess this is a correct number as the output matrix size should be 3x4 and additional 8 filters so 3x4x8 = 96
Please help to figure out where I could have a mistake.
Thanks in advance