Solved by ptrblck in post #2 
              
              
                Replace x = x.reshape(-1, 1600) with x = x.view(x.size(0), -1) to keep the batch size constant and you would most likely get a shape mismatch error in the following linear layer (and should adapt the in_features of it).