Your kernel_stack has only 3 dimensions, which would be a kernel for nn.Conv1d.
Since you are using nn.Conv2d, the checks raise this error.
nn.Conv2d kernels have the shape [out_channels, in_channels, height, width], so you would need to add the missing dimension (e.g. via nn.Parameter(kernel_stack.expand(4, -1, -1, -1))).