I think I might have a solution, if I do torch.nn.functional.conv2d(pad(data).view(1, 2048, 13, 13), kernel.expand(2048, 1, 2, 2), groups=2048) I get a result of shape [1, 2048, 12, 12], where most of the data is the same as convolving with convolve2d, except for the first row, and there rows where every value is nan.
I’ll just look into that and keep you updated.
Thanks!