Solved by nabsabs in post #3 
              
              
                Edit your encoding layers to include a padding in the following way: 
class AutoEncoderConv(nn.Module):
    def __init__(self):
        super(AutoEncoderConv, self).__init__()

        self.encoder = nn.Sequential(

            nn.Conv2d(1, 32, kernel_size=3, padding=1),
            nn.ReLU(True),
 …