Jump to content

Convolutional neural network: Difference between revisions

Line 54: Line 54:
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.


The formula for the output resolution of a convolution is:
<math>
\frac{x-k+2p}{s}+1
</math>
where:
* \(x\) is the input resolution
* \(k\) is the kernel size (e.g. 3)
* \(p\) is the padding on each side
* \(s\) is the stride
Typically a \(3 \times 3\) conv layer will have a padding of 1 and stride of 1 to maintain the same size. A stride of \(2\) would halve the resolution.


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