Jump to content

Convolutional neural network: Difference between revisions

No edit summary
Line 24: Line 24:


and the following 3x3 kernel:<br>
and the following 3x3 kernel:<br>
<pre>
1 1 1
2 1 2
3 2 1
</pre>


For each possible position of the 3x3 kernel over the input image,
For each possible position of the 3x3 kernel over the input image,
we perform an element-wise multiplication (<math>\odot</math>) and sum over all entries to get a single value.
we perform an element-wise multiplication (<math>\odot</math>) and sum over all entries to get a single value.<br>
Placing the kernel in the first position would yield:\\
<math>
\begin{bmatrix}
1 & 2 & 3\\
6 & 7 & 8\\
2 & 5 & 9
\end{bmatrix}
\odot
\begin{bmatrix}
1 & 1 & 1\\
2 & 1 & 2\\
3 & 2 & 1
\end{bmatrix}
=
\begin{bmatrix}
1 & 2 & 3\\
12 & 7 & 16\\
6 & 10 & 9
\end{bmatrix}
</math>\\
Summing up all the elements gives us <math>66</math> which would go in the first index of the output.
 


===Stride===
===Stride===