Solved by KFrank in post #4 
              
              
                Hello Andreas! 

ConvTranspose2d should do what you want (at least in the plain-vanilla, 
2d case – I didn’t check 3d or various stride / padding combinations). 
Here is an example script: 
import torch
torch.__version__
torch.random.manual_seed (2020)

cnva = torch.nn.Conv2d (1, 1, 3, padding = 1, …