I am learning convolutional neural network with Tensorflow.
I have some doubts regarding tf.nn.conv2d
. One of its parameters is filter
:
a filter / kernel tensor of shape [filter_height, filter_width, in_channels, out_channels]
I do not understand what is the meaning of out_channels
.
Suppose input image is [1, 3, 3, 1]
. So the size is 3xx and the channel is 1.
Then we have a filter [2, 2, 1, 5]
, which means after the filtering, we will have an image of size 2x2 ("valid" padding) with 5 channels.
Where are the 5 channels from? From my understanding, the filtering can only have 1 channel generated. Is Tensorflow using 5 different filter functions here?