Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Max pool layer vs Convolution with stride performance

In most of the architectures, conv layers are being followed by a pooling layer (max / avg etc.). As those pooling layers are just selecting the output of previous layer (i.e. conv), can we just use convolution with stride 2 and expect the similar accuracy results with reduced process need?

like image 570
Deniz Beker Avatar asked Jun 21 '17 03:06

Deniz Beker


People also ask

Why would you want to add a max pooling layer rather than a convolutional layer with the same stride?

Max-pooling helps in extracting low-level features like edges, points, etc. While Avg-pooling goes for smooth features. If time constraint is not a problem, then one can skip the pooling layer and use a convolutional layer to do the same.

Why Max pooling is better than average pooling?

Average pooling method smooths out the image and hence the sharp features may not be identified when this pooling method is used. Max pooling selects the brighter pixels from the image. It is useful when the background of the image is dark and we are interested in only the lighter pixels of the image.

Does Max pooling increase accuracy?

The result shows that the use of max-pooling can achieve a higher accuracy which is 84.6% compared to average pooling. Future studies are encouraged to collect more data to further prove the effectiveness of max-pooling layer. Key words: Scoliosis, Lenke, Convolutional Neural Network, Max-pooling, Average pooling.

Can pooling operation be replaced by stride?

In essence, max-pooling (or any kind of pooling) is a fixed operation and replacing it with a strided convolution can also be seen as learning the pooling operation, which increases the model's expressiveness ability.

Can we use convolution with stride 2 for pooling layers?

As those pooling layers are just selecting the output of previous layer (i.e. conv), can we just use convolution with stride 2 and expect the similar accuracy results with reduced process need? Show activity on this post. Yes that can be done.

Why are pooling layers better than convolution layers?

Also, pooling is faster to compute than convolutions. Still, you can always try replacing pooling by convolution with stride and see what works better. I asked one of my friends about this and he said the pooling layers are better because it introduces non-linearity. Do you agree? Hm not so sure I agree.

What is the difference between convolution and pooling in neural networks?

On the other hand, pooling is a cheaper operation than convolution, both in terms of the amount of computation that you need to do and number of parameters that you need to store (no parameters for pooling layer). There are examples when one of them is better choice than the other. The first layer in the ResNet uses convolution with strides.

Is Conv(stride=1) + max pooling faster than Conv (stride =2)?

It depends on what you replace with what. I was assuming a choice between A: conv (stride=1) + max pooling or B: conv (stride=1) + conv (stride=2). If you instead assume A: conv (stride=1) + max pooling replaced by B: conv (stride=2) things become different (B is then faster of course).


1 Answers

Yes that can be done. Its explained in the paper 'Striving for simplicity: The all convolutional net' https://arxiv.org/pdf/1412.6806.pdf. Quote from the paper:

'We find that max-pooling can simply be replaced by a convolutional layer with increased stride without loss in accuracy on several image recognition benchmarks'

like image 183
vijay m Avatar answered Oct 19 '22 02:10

vijay m