Determination and calculation of the number of convolution output channels

What is the number of channels of the convolution kernel? How is the number of convolutional output channels of CNN determined?
The number of channels of the convolution kernel of CNN = the number of channels of the convolution input layer The number
of channels (depth) of the convolution output layer of CNN = the number of convolution kernels
In the calculation of the convolution layer, suppose the input is H x W x C, C is the depth of the input (that is, the number of channels), then the number of channels of the convolution kernel (filter) needs to be the same as the number of input channels, so it is also C, assuming the size of the convolution kernel is K x K, a convolution kernel It is K x K x C, and the corresponding channel of the convolution kernel is applied to the corresponding channel of the input during calculation, so that a convolution kernel is applied to the input to obtain a channel of the output. Suppose there are P K x K x C convolution kernels, so that each convolution kernel applied to the input will get one channel, so the output has P channels.
Insert picture description here
Convolutional layer calculation example In
Insert picture description here
this example, the input is 3 channels and the output is 2 channels. So there are 2 convolution kernels (corresponding to the number of output channels), each convolution kernel is 3 channels (corresponding to the number of input channels), and the size of the convolution kernel is 3*3.
The next example illustrates how this -3 is calculated.
Insert picture description here
Reprinted from: https://blog.csdn.net/qq_41088475/article/details/105766758

Guess you like

Origin blog.csdn.net/qq_35037684/article/details/114935460