In mathematics, a convolution is a function that is applied over the output of another function. In our case, we will consider applying a matrix multiplication (filter) across an image. For our purposes, we consider an image to be a matrix of numbers. These numbers may represent pixels or even image attributes. The convolution operation we will apply to these matrices involves moving a filter of fixed width across the image and applying element-wise multiplication to get our result.
See the following diagram for a conceptual understanding of how image convolution can work:
Figure 1: How a convolutional filter applied across an image (length by width by depth) operates to create a new feature layer. Here, we have a 2x2 convolutional filter, operating in the valid spaces of the 5x5 input with a stride of 1 in both directions. The result is a 4x4 matrix
CNNs also have...