How the filter make it deeper

Hello, after applying a 5x5 filter, and the strider is 1, why it becomes 28x28x6, I didn’t get why it becomes x6.


Hi, @WhyNotPyTorch !

The number of output channels depends on the number of convolutional kernels that are applied to the input. In that case, there are 6 conv kernels, and therefore, 6 output channels.

Btw, very appropiate name for this platform where everything is taught in tensorflow :wink:

Right! Because the input here is 32 x 32 x 1, it might have been slightly more clear if they actually showed the full dimension of filters, which would be 5 x 5 x 1 x 6 for the first layer there. Meaning, as Alvaro says, that there are 6 of them, which then determines the number of output channels (one per filter). Similarly in the second conv layer there, the filter shape is 5 x 5 x 6 x 16, which is why we end up with 16 channels at the output of that layer: we have 16 filters each of which matches the number of channels in the input.