Convolutional neural network: Difference between revisions

Line 34: Line 34:
[https://pytorch.org/docs/stable/nn.html#convolution-layers Pytorch Convolution Layers]<br>
[https://pytorch.org/docs/stable/nn.html#convolution-layers Pytorch Convolution Layers]<br>
[https://towardsdatascience.com/types-of-convolutions-in-deep-learning-717013397f4d Types of convolutions animations]<br>
[https://towardsdatascience.com/types-of-convolutions-in-deep-learning-717013397f4d Types of convolutions animations]<br>
Here, we will explain 2d convolutions.<br>
Here, we will explain 2d convolutions, also known as cross-correlation.<br>
Suppose we have the following input image:<br>
Suppose we have the following input image:<br>
<pre>
<pre>
Line 72: Line 72:
\end{bmatrix}
\end{bmatrix}
</math><br>
</math><br>
Summing up all the elements gives us <math>66</math> which would go in the first index of the output.
Summing up all the elements gives us <math>66</math> which would go in the first index of the output
Shifting the kernel over all positions of the image gives us the whole output, another 2D image.


The formula for the output resolution of a convolution is:
The formula for the output resolution of a convolution is: