# Why should each filter have different weights for each input channel?

From the answers to this question In a CNN, does each new filter have different weights for each input channel, or are the same weights of each filter used across input channels?, I got the fact that each filter has different weights for each input channel. But why should that be the case? What if we apply the same weights to each input channel? Does it work or not?

## 1 Answer

For simplicitly, let's consider only the first convolutional layer, that is, the one applied to the image. If you consider an RGB image, then there are $$3$$ channels: the red channel, the green channel and the blue channel. Thus, a kernel that is applied to this image will also have $$3$$ channels: the red channel, the green channel and the blue channel. In general, the distributions of the intensity of the red, green and blue colors in the image are different, so, in general, the red, green and blue channels of the kernel will also be different because they need to keep track of different information.

• Thanks for your answer. I understand what you mean, so do you think it is possible to use the same weight for different channel? Or do you know someone who tried it and got a result? – wangxl Jun 10 '19 at 8:24
• The weights are the learnable parameters. They are changed by gradient descent and the back-propagation algorithm during training. – nbro Jun 10 '19 at 9:17
• @wangxl To test it yourself you could just modify your images to place the red channel at the top, the green channel in the middle and the blue channel at the bottom (so that your 3-channel width * height image becomes a 1-channel width * (3*height) image) and feed that single-channel image into the network. This will contain all the same information as your original image, but only train a single set of filter kernels. – DrMcCleod Jul 11 '19 at 12:04