Learn Before
Mathematical Implementation of Forward Propagation
This node before explained how it works, and now we need to understand how to write the operation mathematically and more importantly code it efficiently. So suppose we have the input I with the shape H x H x C, where B - the batch, H - is the height and width of the image( just taking square image for the example), C - the amount of channels. One kernel k has a size of K x K x C( also taking square kernel for the sake of the example). b is the bias for that kernel
- is the output matrix for the current kernel with size of H-K+1, H-K+1. This is the variation of the Convolution with no padding and stride one. Most of the libraries call it convolution but it is actually an operation called cross-correlation. In terms of coding the formula for convolution, there are several ways to implement it. One of them might be just straight brute force with nested loops, turning everything int a big matrix multiplication, and even using Fourier transforms. While brute force solution is straight forward, other two ways are not that easy to visualize and understand
1
1
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