Deep Learning · MT2 · section

Convolution over several channels

Convolutional neural networks

Definition. A standard convolutional filter spans every input channel. At one spatial position, channel-wise weighted sums are accumulated and one filter bias is added, producing one scalar output in that filter's feature map.

Explanation and working

A 3 × 3 filter receiving RGB input has depth 3, so it contains 3 × 3 × 3 weights. At one position, compute a weighted sum in each of the three channels, add those sums, and then add the filter’s one bias. One filter produces one output channel. Sixteen filters produce sixteen output channels.

Add the channel contributions into one output cell. The filter bias is added once after those contributions. Tap the diagram to enlarge.

Tiny example. At one position the red, green and blue channel sums are 2, −1 and 4. With bias 0.5, the output is 2 − 1 + 4 + 0.5 = 5.5. Do not keep three separate outputs for this one filter; they have been added.