Solved by ptrblck in post #3 
              
              
                You forgot to register the modules using self: 

class network(torch.nn.Module):
  def __init__(self):
    self.upscale = nn.Upsample(scale_factor=2, mode='bilinear')
    self.conv1 = nn.Conv2d(963, 128, kernel_size=3, padding=1)
    self.conv2 = nn.Conv2d(128,64, kernel_size=3, padding=1)
    self.…