Solved by gphilip in post #2 
              
              
                Did you try setting the random seed to a fixed number? You can set this seed as follows: 
torch.manual_seed(0) 
See also: Reproducibility.