I have been working on this exercise for a while and I still could not find the problem. I would be glad if someone could help to find the answer.

Thanks.

Here is the error that I got

ValueError 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)

80 weights = W[:,:,:,c:c+1]

81 biases = b[0,0,0,c:c+1]

—> 82 Z[i, h, w, c] = conv_single_step(a_slice_prev, weights, biases)

83 # YOUR CODE ENDS HERE

84in conv_single_step(a_slice_prev, W, b)

23 # Z = None

24 # YOUR CODE STARTS HERE

—> 25 s = a_slice_prev * W

26 Z = np.sum(s, axis=None)

27 Z = Z + float(b[0])ValueError: operands could not be broadcast together with shapes (1,3,3,1) (3,3,4,1)