Contents
What Is a Channel?
[CNN] Understanding Channels in Convolutional Neural Networks
First, TensorFlow defines the meaning of channels in input samples. A typical RGB image has 3 channels (red, green, and blue), while a monochrome image has a channels count of 1.
Second, according to MXNet, channels generally refers to the number of convolution kernels in each convolutional layer.
For example, suppose we have a 6×6×3 image sample and perform convolution using a 3×3×3 convolution kernel (filter). The input image has 3 channels, while the in_channels of the convolution kernel must match the channels of the data being convolved (the image sample in this case, so it is 3).
Next, during convolution, the 27 numbers in the convolution kernel are multiplied by their corresponding values in the sample and then summed to obtain the first result. Repeating this process eventually produces a 4×4 result.

After the steps above, because there is only one convolution kernel, the final result is 4×4×1, and out_channels is 1.
In practice, multiple convolution kernels are used. If another convolution kernel is added here, the result will be 4×4×2.

Summary
- The
channelsof the initial input image sample depend on the image type, such as RGB; - The
out_channelsproduced by convolution depends on the number of convolution kernels. Thisout_channelsalso becomes thein_channelsof the convolution kernel in the next convolution; - The
in_channelsof a convolution kernel is theout_channelsof the previous convolution. For the first convolution, it is the sample image’schannelsfrom item 1.
Comments