W1 A2: Why does the pooling layer use padding='same'?

One important thing to note is that “same” padding only produces the same output size if the stride is 1. If the stride is greater than 1, then the size will not be the same. But in most cases is it still different than the size would be with valid padding. In most cases pooling layers do not have a stride of 1.

Here’s a thread which shows some examples of how this works and here’s one that explains why same is not necessarily the same.

2 Likes