Forward propagation

Let's begin with the forward propagation. We have already seen how forward propagation works and how a CNN classifies the given input image. Let's frame this mathematically. Let's consider an input matrix, X, and filter, W, with values shown as follows:

First, let's familiarize ourselves with the notations. Whenever we write , it implies the element in the row and the column of the input matrix. The same applies to the filter and output matrix; that is, and represent the  row and the  column value in the filter and output matrix, respectively. In the previous figure, = , that is, is the element in the first row and first column of the input matrix.

As shown in the following diagram, we take the filter, slide it over the input matrix, perform a convolution operation, and produce the output matrix (the feature map) just as we learned in the previous section:

Thus, all the values in the output matrix (feature map) are computed as follows:

Okay, so we know this is how a convolution operation is performed and how the output is computed. Can we represent this in a simple equation? Let's say we have an input image, X, with a width of W and a height of H, and the filter of size P x Q, then the convolution operation can be represented as follows:

This equation basically represents how the output, (that is, the element in the row and the column of the output matrix), is computed using a convolution operation.

Once the convolution operation is performed, we feed the result,, to a feedforward network, , and predict the output, :

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset