In the previous article, we saw why we need convolutional neural networks for solving the image classification problem.
The first thing a convolutional neural network does is apply a filter to the input image.
In convolutional neural networks, a filter is a smaller square, usually 3 × 3 pixels in size.
The value of each pixel in the filter is learned using backpropagation.
Before training a convolutional neural network, we start with random filter values.
After training using backpropagation, these values become more meaningful and useful.
To apply the filter to the input image, we overlay the filter on top of the image.
Then we multiply each overlapping pixel value from the image with the corresponding value in the filter.
(0 × 0) (0 × 0) (1 × 1)
(0 × 0) (1 × 1) (0 × 0)
(1 × 1) (0 × 0) (0 × 0)
Next, we add all these products together.
(0 × 0) + (0 × 0) + (1 × 1) +
(0 × 0) + (1 × 1) + (0 × 0) +
(1 × 1) + (0 × 0) + (0 × 0) = 3
This sum of products is called the dot product.
By computing the dot product between the input image and the filter, we say that the filter is convolved with the input. This operation is what gives convolutional neural networks their name.
Next, we add a bias term to the output of the filter and place the result into something called a feature map.
In this example, the bias is -2.
3 − 2 = 1, and this value is added to the feature map.
Now we shift the filter by one pixel and repeat the same process.
(0 × 0) + (0 × 1) + (1 × 1) +
(0 × 1) + (1 × 0) + (0 × 0) +
(1 × 0) + (0 × 0) + (0 × 0) = 1
1 − 2 = -1
After repeating this process across the entire image, we obtain the following output.
Typically, we pass the feature map through the ReLU activation function.
This means all negative values are set to 0, while positive values remain unchanged.
Our feature map is now ready. In the next article, we will move on to the next level of filtering.
Looking for an easier way to install tools, libraries, or entire repositories?
Try Installerpedia: a community-driven, structured installation platform that lets you install almost anything with minimal hassle and clear, reliable guidance.
Just run:
ipm install repo-name
… and you’re done! 🚀









Top comments (0)