Solved by JuanFMontesinos in post #2 
              
              
                You can use pytorch resize which should match that one. 
https://pytorch.org/docs/stable/generated/torch.nn.functional.interpolate.html 
As a  layer: 
https://pytorch.org/docs/stable/generated/torch.nn.Upsample.html?highlight=resize