Stride

Stride

by Aidas Venckunas -
Number of replies: 1
Hello,

Why do we say that stride=k means that you take every k-th element, but when represented visually it only takes every k-th element from a middle of the matrix:

Thank you for your answer.
In reply to Aidas Venckunas

Re: Stride

by Nicolas Talabot -
Hi,

Nice catch, to me it looks like it may be a mistake in the slides: the drawing would correspond to a parameter called "dilation" which control the spacing between each kernel point (https://github.com/vdumoulin/conv_arithmetic/blob/master/README.md#dilated-convolution-animations).
Dilation was not seen in the course and won't be in the exam.

Instead, the stride can be understood as the size of the "jump" the kernel makes every time it is moved on the input.
For example, looking at the CNN lecture between slides 9 and 10, the kernel moves to the right by one. This corresponds to stride=1. With stride=2, it would rather move by two and "skip" the position in-between.
(Visual example: https://avvineed.com/img/stride_examples.png)

Best,
Nicolas