How the layers of the CNN work

Convolutional Neural Networks are heavily used in computer vision and recomendation systems. The magic behind Neural Networks in general lies on hidden layers as well as training, but how these layers work on Convolutional Neural Nets?

Learning new features

If you haven’t been around Convolutional Neural Networks and want a quick intro you might want to take a look here. The first part of the layers of a CNN is called convolutional layer, pretty convenient right? But how does it work?

We already saw how computers see images, and how we can use the weights and bias in the perceptron to learn spatial information. The layers of the CNN go beyond, we pass the image through a series of filters. We could create types of edge detectors and stack them up.

convolutional layerconvolutional layer

Reducing dimensionality

What is the problem with this approach? In the end we eventually need to pass this as a one dimensional vector to a fully connected layer. With this reason in mind pooling layers were created. In the example above we have max 2d pooling layer. 

pooling layerpooling layer

A 2×2 window is passed through the image and get only the maximum value for each window, this reduces our dimension. We have a pooling layer after 1 to 3 convolutional layers. If you want more content like this, I have a YouTube Channel