Solved by ptrblck in post #2 
              
              
                You should set your model to evaluation using model.eval(). 
This will change the behavior of some layers, e.g. nn.Dropout won’t drop units anymore and nn.BatchNorm will use its running estimates instead of the batch statistics.