官术网_书友最值得收藏!

  • Deep Learning with R for Beginners
  • Mark Hodnett Joshua F. Wiley Yuxi (Hayden) Liu Pablo Maldonado
  • 448字
  • 2021-06-24 14:30:47

Pooling layers

Pooling layers are used in CNNs to reduce the number of parameters in the model and therefore they reduce overfitting. They can be thought of as a type of dimensionality reduction. Similar to convolutional layers, a pooling layer moves over the previous layer but the operation and return value are different. It returns a single value and the operation is usually the maximum value of the cells in that patch, hence the name max-pooling. You can also perform other operations, for example, average pooling, but this is less common. Here is an example of max-pooling using a 2 x 2 block. The first block has the values 7, 0, 6, 6 and the maximum value of these is 7, so the output is 7. Note that padding is not normally used with max-pooling and that it usually applies a stride parameter to move the block. Here, the stride is 2, so once we get the max of the first block, we move across, 2 cells to the right:

Figure 5.10: Max-Pooling applied to a matrix

We can see that max-pooling reduces the output by a factor of 4; the input was 6 x 6 and the output is 3 x 3. If you have not seen this before, your first reaction is probably disbelief. Why are we throwing away data? Why do we use max-pooling at all? There are three parts to this answer:

  • Pooling: It is normally applied after a convolutional layer, so instead of executing over pixels, we execute over matched patterns. Downsizing after convolutional layers does not discard 75% of the input data; there is still enough signal there to find the pattern if it exists.
  • Regularization: If you have studied machine learning, you will know that many models have problems with correlated features and that you are generally advised to remove correlated features. In image data, features are highly correlated with the spatial pattern around them. Applying max-pooling reduces the data while maintaining the features.
  • Execution speed: When we consider the two earlier reasons, we can see that max-pooling greatly reduces the size of the network without removing too much of the signal. This makes training the model much quicker.

It is important to note the difference in the parameters used in the convolutional layer compared to the pooling layer. In general, a convolutional block is bigger (3 x 3) than the pooling block (2 x 2) and they should not overlap. For example, do not use a 4 x 4 convolutional block and a 2 x 2 pooling block. If they did overlap, the pooling block would just operate over the same convolutional blocks and the model would not train correctly.

主站蜘蛛池模板: 安图县| 兰州市| 犍为县| 墨竹工卡县| 江华| 惠东县| 藁城市| 巨野县| 新巴尔虎右旗| 固原市| 樟树市| 凤庆县| 馆陶县| 仙桃市| 沽源县| 闽侯县| 牟定县| 南漳县| 扶风县| 通榆县| 北安市| 仙桃市| 宿迁市| 镇雄县| 石嘴山市| 佛学| 金坛市| 鄱阳县| 衡南县| 乐山市| 浦县| 双流县| 恩平市| 宜都市| 盘锦市| 顺平县| 六盘水市| 余江县| 科尔| 镇雄县| 霍林郭勒市|