Hi, Thanks for the answer.
my point is that if I use  nn.Conv2d(1, 5, kernel_size=(4, 4), bias=False) , i.e. output channels 5, but still remain with lets say 4 filters  weight = torch.randn(4, 1, 4, 4) ), it still works (I was assuming that I must provide 5 filters). Probaly it is  allowed to overwrite 5 output channels to 4 (please let me know whether I am right or wrong). It was very strange to me and this behaviour is prone to potential bugs.