Notice that you fail on both the first test (which has stride = 2) and then the assertion is thrown on the conv_forward_test_2 with the mean being wrong, but that test actually has stride = 1. The thing that trips most people up here is handling the stride correctly, but it looks like your problem is something else or maybe something additional.
Are you sure that you nested your loops correctly? There are 4 levels of nesting here, but you have to get the indentation right for that to happen.
Also are you sure you didn’t reverse the roles of the h and w dimensions? H stands for “height” in this case, not horizontal, right?
For the stride, make sure that it does not appear in the loop ranges. The loops here are over the output space and we must touch every position there. The striding happens in the input space, so we need to calculate where we are in the input space each iteration.