Jump to content

Convolutional neural network: Difference between revisions

Line 84: Line 84:
* \(s\) is the stride
* \(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.
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.
===Kernel===
Typically these days people use small kernels e.g. \(3 \times 3\) or \(4 \times 4\). 
Note that in practice, people use multi-channel inputs so the actual kernel will be 3D. 
A ''Conv2D'' layer with \(C_1\) input channels and \(C_2\) output channels will have \(C_2\) \(3 \times 3 \times C_1\) kernels.   
However, we still call this ''Conv2D'' because the kernel moves in 2D only. 
Similarly, a ''Conv3D'' layer will typically have a 4D kernel.


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