Solved by ptrblck in post #2 
              
              
                Are you using the same batch size to compute the new output? 
If you don’t need to train the model, wrap the code in a with torch.no_grad() block to save memory.