Solved by John_Smith in post #2 
              
              
                model = nn.Sequential(
          nn.Conv2d(1, 16, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1)),
          nn.ReLU(),
          nn.Conv2d(16, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1)),
          nn.ReLU()
        )

nn.Sequential(
    nn.Conv2d(1, 1, kernel_size=(4, 4), stride=(2, …