AssertionError Traceback (most recent call last)
in
23 assert db.shape == (1, 1, 1, 8), f"Wrong shape for db {db.shape} != (1, 1, 1, 8)"
24 assert np.isclose(np.mean(dA), 1.4524377), “Wrong values for dA”
—> 25 assert np.isclose(np.mean(dW), 1.7269914), “Wrong values for dW”
26 assert np.isclose(np.mean(db), 7.8392325), “Wrong values for db”
27
AssertionError: Wrong values for dW
I don’t understand what \mathrel{+} means. Can anyone explain me, please? I think the error come from this, because I wrot for dW[:,:,:,c] += a_slice * dZ[i, h, w, c].
When I wrote \mathrel{+} I got error.
I ran into this same issue! I found out this was due to the dZ horizontal/vertical order not matching the matrix it is being multiplied by. Because the input dZ is[i, h, w, c] the horizontal dimensions need to go first when slicing the padded activation.
dZ is also used to calculate dA so having any mismatch there could cause issues later on too because the conv_backward() test uses a (10, 4, 4 3) activation as the input and it is tested using np.mean() which means transposing the matrix by mixing up the axes will not cause the test to fail.