yes, the first 2 parameters are in and out for channel
class torch.nn.Conv2d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True)
i’m looking at the first layer in each example
mnist: self.conv1 = nn.Conv2d(1, 10, kernel_size=5)
cifar10: self.conv1 = nn.Conv2d(3, 6, 5) # i assume 5 here is the same as kernel_size=5 in the example in the line above
so input channels of 1 for mnist and 3 for cifar10 makes sense.
but how are the outputs 10 for mnist but only 6 for cifar10. these are the numbers i cannot understand.
in my head mnist 1 x 28 x 28 with a kernel of 5 produces 1 x 24 x 24
and cifar10 3 x 32 x 32 with a kernel of 5 produces 3 x 28 x 28.
it’s the concept of how the images get ‘deeper’ that i’m missing.
(thinking of things as cubes when its ‘Conv2D’ is a little confusing. why not Conv3D’ ?)