Also, the shapes and *_start, *_end values are as follow throughout the loop until the error occurs:
a_prev_pad.shape, vert_start,vert_end, horiz_start, horiz_end, a_slice_prev.shape, weights.shape, biases.shape
(7, 9, 4) 0 3 0 3 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 0 3 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 0 3 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 0 3 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 0 3 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 0 3 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 0 3 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 0 3 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 2 5 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 2 5 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 2 5 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 2 5 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 2 5 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 2 5 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 2 5 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 2 5 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 4 7 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 4 7 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 4 7 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 4 7 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 4 7 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 4 7 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 4 7 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 4 7 (3, 3, 4) (3, 3, 4) (1, 1, 1)
(7, 9, 4) 0 3 6 9 (3, 3, 4) (3, 3, 4) (1, 1, 1)
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)
81 biases = b[:,:,:,c]
82 print(a_prev_pad.shape, vert_start,vert_end, horiz_start, horiz_end, a_slice_prev.shape, weights.shape, biases.shape)
—> 83 Z[i, w, h, c] = conv_single_step(a_slice_prev, weights, biases)
84
85
IndexError: index 3 is out of bounds for axis 1 with size 3