Stride basically refers to the step size we take when we slide the kernel across theÂ
input image.
An example of a stride of 1Â is shown in the following screenshot:
Fig 6.10: Stride of 1
In a stride of 1, the value of the feature map is 9. Similarly, a stride of 2 looks as follows:Â
Fig 6.11: Stride of 2
When we have a stride of 2, the value of the feature map will be 4, which is equivalent to 2 x 2.
Stride is important because of the following points:
- The stride controls the size of the convolution layer output.
- Using larger strides produces less overlap in kernels.
- Stride is one of the methods to control the spatial input size—that is, passing information to other input layers without losing it.