C4 W1 A1: Clarification about pooling layer implementation

Hello everyone,
I’m trying to implement the forward pooling layer from the first assignment C4W1. The check cell shows the assertion error “Make sure you have included stride in your calculation”. I’m not sure what is wrong in my implementation, here is my code.

{moderator edit: code removed}

Please do not post your code on the forum. That’s not allowed by the Code of Conduct. I will edit your post to remove the code.

If a mentor needs to see your code, we’ll contact you with instructions.

You can post screen capture images of any asserts or error messages, that’s fine.

Hint: Your code isn’t using the “stride” parameter. The code for pool_forward() should be very similar to what you used for conv_forward().

Thanks for your response. I’m using the “stride” parameter for calculating n_{H} and n_{W}, should I use it for adjusting vert/horiz-start/end?

Yes.

Thanks a lot, everything works fine now.