Strides and padding
Two important parameters common to all convolutions are padding and strides. Let's consider the bidimensional case, but keep in mind that the concepts are always the same. When a kernel (n × m with n, m > 1) is shifted upon an image and it arrives at the end of a dimension, there are two possibilities. The first one, called valid padding, consists of not continuing even if the resulting image is smaller than the original. In particular, if X is a w × h matrix, the resulting convolution output will have dimensions equal to (w - n + 1) × (h - m + 1). However, there are many cases when it's useful to keep the original dimensions, for example, to be able to sum different outputs. This approach is called same padding and it's ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access