Pooling
It is a common practice to add pooling layers after convolution layers, as they reduce the size of feature maps and the outcomes of convolution layers.
Pooling offers two different features: one is reducing the size of data to process, and the other is forcing the algorithm to not focus on small changes in the position of an image. For example, a face-detecting algorithm should be able to detect a face in the picture, irrespective of the position of the face in the photo.
Let's look at how MaxPool2d works. It also has the same concept of kernel size and strides. It differs from convolutions as it does not have any weights, and just acts on the data generated by each filter from the previous layer. If the kernel size is 2 x 2, then ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access