The kernels for nn.Conv2d have the shape [out_channels, in_channels, height, width].
It seems some channel dimensions are missing.
Could you explain your use case a bit, i.e. what kind of input do you have (number of channels etc.) and how should the kernel be applied on it?