Ow! In first post I asked about training loss or test loss, now I can get what you mean. Actually, after training for a while you are trying to validate your model so, this can be considered as testing. You have to use same configuration with testing which is using model.eval and torch.no_grad for looping over batches.



 Michael-J98:

Loss is computed over one batch.


In this case, when you turn shuffle off, the batches are not identical to the case where shuffle is on for validation set. What may happen is that in ‘off’ case, the validation batch has simpler examples. To find out that your model is working properly or not, you just need to aggregate loss over all batches in case of shuffled and not shuffled.