Hmrishav_Bandyopadhy:

As you see two filters are generated and they will be used in the two channels. But as out_channels=1 we should have a single filter which is convolved with the two channels and the outputs of those convolutions are added to create a single filter.


We might be using a different terminology, since I see
out_channels=1
in_channels=2
height=3
width=3
print(torch.rand([out_channels,in_channels,height,width]))

as a single filter with multiple input channels.
What you’ve described is how each channel of this single filter is interacting with the channels of the input activation. These are generally not considered to be different filters.
CS231n - Convolution layer 7 gives a good description of the kernel shapes and how they are used.