けの〜のブログ

ガッキーでディープラーニングして教育界に革命を起こす

CNNについて ③ プーリング層について How does Pooling Layer Work

以前までの記事でConvolution Layerの振る舞い、畳み込み処理について書き留めた。

 

次はConvolution Layer の直後に処理として施されることがある、Pooling Layer プーリンング層についてポイントを書き留めたいと思う。

 

岡谷貴之著 深層学習の説明によると

プーリング層は通常畳込み層の直後に設置されます。

プーリング層は畳み込み層で抽出された特徴の位置感度を若干低下させることで対象とする特徴量の画像内での位置が若干変化した場合でもプーリング層の出力が普遍になるようにします

またCS231nの授業ノートによると

f:id:keno-lasalle-kagoshima:20171106152651p:plain

cs231n.github.io

Pooling Layer

It is common to periodically insert a Pooling layer in-between successive Conv layers in a ConvNet architecture. Its function is to progressively reduce the spatial size of the representation to reduce the amount of parameters and computation in the network, and hence to also control overfitting.

It is worth noting that there are only two commonly seen variations of the max pooling layer found in practice:

It is worth noting that there are only two commonly seen variations of the max pooling layer found in practice: A pooling layer with F=3,S=2 (also called overlapping pooling), and more commonly F=2,S=2

Pooling sizes with larger receptive fields are too destructive.

画像の空間サイズの大きさを小さくすることで調整するパラメーターの数を減らし、過学習を防止するようだ

zero paddingは行わないのが普通らしい

 

最大プーリング(max pooling)と平均プーリング(average pooling)など様々な種類があるようだが、画像認識への応用では最大プーリングが実用性の面から定番となっているみたい。

 

ただPooling Layerを無くそうとする取り組みもあるみたいだ

Getting rid of pooling. Many people dislike the pooling operation and think that we can get away without it. For example, Striving for Simplicity: The All Convolutional Net proposes to discard the pooling layer in favor of architecture that only consists of repeated CONV layers. To reduce the size of the representation they suggest using larger stride in CONV layer once in a while. Discarding pooling layers has also been found to be important in training good generative models, such as variational autoencoders (VAEs) or generative adversarial networks (GANs). It seems likely that future architectures will feature very few to no pooling layers.

畳み込み層のStrideを大きくすることでパラメーターの数を縮小させるらしい

画像生成モデル(GANなど)ではPooling Layerをなくすことが効いてきたりするらしい