Resnet101 performs differently at different batch_size

I use resnet pretrained model to fine tune my own dataset. Everthing seems ok but I found that at the testing phase, the result is different due to different batch_size setting of test_loader. I change the pretrained model to alexnet, everthing goes well and the result is consistent. Why?

Do you change your network to evaluation mode?
Note that resnet has BatchNorm, which is affected by the batch size, while AlexNet doesn’t

Sorry, I forgot it. Thanks for your help, it fixes my problem.