Strides

We have just learned how a convolution operation works. We slide over the input matrix with the filter matrix by one pixel and perform the convolution operation. But we can't only slide over the input matrix by one pixel. We can also slide over the input matrix by any number of pixels.

The number of pixels we slide over the input matrix by the filter matrix is called a stride.

If we set the stride to 2, then we slide over the input matrix with the filter matrix by two pixels. The following diagram shows a convolution operation with a stride of 2:

But how do we choose the stride number? We just learned that a stride is the number of pixels along that we move our filter matrix. So, when the stride is set to a small number, we can encode a more detailed representation of the image than when the stride is set to a large number. However, a stride with a high value takes less time to compute than one with a low value.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset