Skip to main content


Showing posts with the label stride

A simple explanation to filters, stride and padding in convolution neural networks

We know that CNN use filters to extract feature from the image. This filter moves across the image starting from top left and moving towards right. Once it reaches at the horizontal end of the image, it moves one step vertically downwards and then start moving from left to right. It repeats this process until it reaches at the lower right corner of the image. Photo by Birger Strahl Now lets see how these filters extract the features from the image, but before that lets understand what filters actually are? What are Filters? Filters are nothing but a matrix of specific number which are when multiplied by an image gives a particular feature map. For example, in the below image when multiplied by a “Right sobel” filter gives an output feature map with vertical lines detected in it. Right sobel filter on a 2d image Different filters have different specific values to detect different features. Different filter and their values Now imagine the below image as a image matrix and we pass a