2 hidden tests are failing in my assignment. I suspect the issue is with my pool_forward code with a stride of 2. I have actually taken the stride into account while looping over both the vertical and horizontal axes of the output volume, and have passed all the test cases for conv_forward even with a stride of 2.
In the case where pool_forward has a stride of 2, I get the following output:
mode = max
A.shape = (2, 2, 2, 3)
A[0] =
[[[1.74481176 0.90159072 1.65980218]
[0. 0. 0. ]]
[[0. 0. 0. ]
[0. 0. 0. ]]]
mode = average
A.shape = (2, 2, 2, 3)
A[1] =
[[[-0.17313416 0.32377198 -0.34317572]
[ 0. 0. 0. ]]
[[ 0. 0. 0. ]
[ 0. 0. 0. ]]].
I am not sure why only the first row is populating with non-zero values, but the values that are showing up match the expected values.