When it comes to Machine Learning, Artificial Neural Networks perform really well.
Artificial Neural Networks are used in various classification task like image, audio, words.
For Image Classification we use Convolution Neural Network. Here, we are going to build basic building block for CNN.
Convolution Neural Networks or covnets are neural networks that share their parameters.
Imagine you have an image.
It can be represented as a cuboid having its length, width (dimension of the image) and height (as image generally have red, green, and blue channels).
Now imagine taking a small patch of this image and running a small neural network on it, with say, k outputs and represent them vertically.
Now slide that neural network across the whole image, as a result, we will get another image with different width, height, and depth.
Instead of just R, G and B channels now we have more channels but lesser width and height. This operation is called Convolution.
If patch size is same as that of the image it will be a regular neural network. Because of this small patch, we have fewer weights.
Now let’s talk about a bit of mathematics which is involved in the whole convolution process.
Let’s take an example by running a covnets on of image of dimension 32 x 32 x 3.
The final Convolutional Neural Network is made up of a combination of these layers,
For better understanding of CNNs and the Math behind it along eith the code, check out the jupyter notebook here.