Hi, thanks for you answer. I read up on how scipy.signal.convolve2d with same mode. This works indeed with padding, but is ‘centered’ with respect to ‘full’, so I guess in my case that means using the ReflectionPad2d layer and follow the same approach you suggest.
The other question still remains because the final output is still [2048, 2048, 12, 12] because every image is convolved with every mask rather than each image with each corresponding mask, which would make the final output [2048, 1, 12, 12]. Do you also have a solution for that?
Thanks!