C4 W1 A1: Error in conv_forward and pool_forward

First, sharing your code is not allowed by the community code of conduct. So avoid sharing it.

I found a couple of mistakes in your code. Your for loop for n_H and n_W will only work when stride is 1. You have given that loop over the vertical axis/horizontal axis of the output volume. Did they mention skipping some axis in the range of loop? No, the skipping will be done in the next calculation, not in the range of loop. But you are making it complex by using stride as a step in it.

Your vert_start , vert_end , horiz_start , and horiz_end are also wrong. You need to see this post.