Ch 5 ▸ Pooling ▸ Module 2/4
Average pooling.
🔒 This module is locked
It builds on Max pooling. Pass that module’s knowledge check to unlock it, or skip ahead if you already know the material.
Average pooling is pooling where the rule is “keep the mean”: add up the values in the window and divide by how many there are. Here is the same 4×4 map as in the last module, pooled with a 2×2 window at stride 2:
The top-left window is (1 + 3 + 4 + 6) / 4 = 3.5. Max pooling gave 6 for the same window.
Average pooling is a convolution in disguise. A 2×2 kernel with all four weights set to 1/4 computes the same mean, so 2×2 average pooling at stride 2 is that kernel at stride 2. Chapter 3’s blur kernel, with nine weights of 1/9, is 3×3 average pooling at stride 1. The difference is that a convolution’s weights get trained, while pooling’s rule is fixed.
What each one throws away
Switch figure 5.2 between max and avg and compare the two outputs. Average pooling gives a small, blurred copy of the image. Max pooling gives a brighter, chunkier one, because the brightest pixel in each window wins.
The difference is clearest with one strong value among weak ones. Take a window with one pixel at 1 and three at 0:
- Max pooling outputs 1. The strong value survives at full strength.
- Average pooling outputs 1/4 = 0.25. The strong value is diluted by its neighbors.
Each one discards something. Max pooling keeps only the winner, so it discards everything about the other pixels in the window. Average pooling keeps a little of every pixel, so a single strong value can’t stand out. Inside a network, where a large value means “a pattern was found here”, that’s why max pooling is the usual choice between convolution layers: one strong detection anywhere in a window is usually what matters.
Knowledge check ▸ 4 questions
Before you move on.
Answer every question correctly to unlock the next module. A wrong answer gets a hint, and you can try again as many times as you like.
1A 2×2 window holds 2, 8, 5 and 1. What does average pooling output for it?
2A 2×2 window holds one pixel at 1 and three at 0. What does average pooling output for it?
3Average pooling with a 3×3 window at stride 1 gives the same output as which convolution?
4A window holds one strong value surrounded by weak ones. Which kind of pooling passes the strong value on at full strength?