Solved by ptrblck in post #2 
              
              
                You could create a nn.Module with your interpolate function as a workaround: 
class Interpolate(nn.Module):
    def __init__(self, size, mode):
        super(Interpolate, self).__init__()
        self.interp = nn.functional.interpolate
        self.size = size
        self.mode = mode
        
    d…