We'll see how to increase the dimension of the output matrix by using padding, and how to greatly decrease it through use of the stride. You will recall from the previous section, that we're convolving a 6 x 6 x 3 input image with 3 x 3 filters, which gives us a 4 x 4 x 1 matrix output:
And as you may have guessed, these output dimensions can be described by a math formula, and that formula appears as follows:
In this equation, IM is just the input matrix dimension, OM is the output matrix dimension, and F refers to the filter size. So let's apply this formula:
We can do the same for the other dimension as well. Feel free to try a different size of input images with different filters, and see how this formula will actually work. You can do that even for the edge detection application. Regardless of this formula...