Usually, it would be the other way around.
You may need to check the batch size for test mode (if it is higher than training) as well as if you are testing with torch.no_grad().
If the reason is not one of the mentioned above, you may need to post any short snippet code with dataloader/test method to get a valid answer.