Learn Before
Padding Convolution
Since kernels generally have width and height greater than 1, after convolving an image by the kernel, the image size will be reduced. By adding padding to the input image, we can have the output with the same size as input.
If we start with a 240×240-pixel image, 10 layers of 5×5 convolutions reduce the image to 200×200 pixels, slicing off 30% of the image and with it obliterating any interesting information on the boundaries of the original image. Padding is the most popular tool for handling this issue.
In the below example, we pad a 3×3 input, increasing its size to 5×5. The corresponding output then increases to a 4×4 matrix. The shaded portions are the first output element as well as the input and kernel tensor elements used for the output computation: 0×0+0×1+0×2+0×3=0.
0
2
Contributors are:
Who are from:
Tags
Data Science
Related
Mathematical Implementation of Forward Propagation
Convolution Visualizer
Calculating Cross-Correlation (Convolution) Operation Example
Padding Convolution
Strided Convolution
Computation of Convolution Output Size
Two-Dimensional Convolution Operation Procedure
3D Convolution Layers
Convolutions Over Volumes