Solved by ptrblck in post #6 
              
              
                You could try to manipulate the native conv2d implementation, but note that you won’t be able to manipulate the backend implementations from e.g. cudnn. 
I’m also not sure, if that would be easier than to write out your operations manually. 
The padding argument in nn.Conv2d can be simply added to t…