Solved by ptrblck in post #2 
              
              
                densenet121 uses batchnorm layers, which will update their running estimates during training in each forward pass. 
During evaluation these running estimates will then be applied instead of the batch statistics, which explains the difference in your outputs.