# What does the “number of channels” correspond to in U-Net?

I'm studying the U-Net CNN architecture. I'm new to CNNs and am confused regarding the "number of channels".

Referring to the U-Net diagram, the input image is convolved with a 3x3 mask which generates a 570x570 output. This output image is then convolved again by a 3x3 mask to produce a 568 x 568 signal. However, what do the 64's correspond to?

The U-net says something about a multi-channel feature map. But how does convolving an image by a 3x3 mask results in a "64".

• This related question might help you get a better understanding of the structure and function of (multichannel) CNNs. – legammler Apr 29 at 6:52
• @legammler So how I'm currently interpreting the U-net diagram. The architecture declares a set of 64 convolution masks that we're attempting to tune. Thus, convolving a single gray scale image with 64 masks would produce 64 new signals. However, the second 64 confuses me. If we were to repeat this operation, why do we still have 64 channels? Wouldn't we get 64 x 64 channels? – Izzo Apr 29 at 13:22

## 1 Answer

In this example you have a gray scale image of size 572x572 and 1 (gray) channel. The first convolution operation consists of 64 filters of size 3x3 and 1 channel per filter. The channel of the filters always fits the channel size of the previous layer (here: the Input). In the second convolution step of this explicit architecture, you again use 64 filters of size 3x3. In this case, each of these filters consists of 64 channels according to the previous output (64 feature maps/channels). The output of the second convolution consists of 64 feature maps according to the amount of 64 filters in the second convolution. This video from Andrew Ng visualizes it perfectly.

• I think I understand. The first convolution features 64, 3 x 3 x 1 filters to generate an output that is 570 x 570 x 64. The second convolution features 64, 3 x 3 x 64 filters resulting in a 568 x 568 x 64 output. I understand the arithmetic now, it definitely was not obvious while reading. – Izzo Apr 30 at 0:53