Let us ignore the batch size for a moment (which is not part of the weight shape). Let us take something else than 1 for in the input_channel, 2. You have (2,32,32), you want (6,30,30). Omitting the data dimensions, what happens is: (6 x 2) . (2 x 1) => (6 x 1) . Note that the final 1 dim has been appended in the input shape, so you can remove it in the output shape and you end up with (6).