How to use batchnorm while using pre-trained weights

I’m trying to implement a YOLO object detector using weights provided by the author. While the program works fine with .train(True), as soon as I call eval on the model and run it, the detection outputs has NaNs, all over it. Is it because of the fact, the the population statistics of the in-built batchnorm layer doesn’t play nice with the YOLO weights? If yes, do I need to set the population statistics calculated upon the dataset on which YOLO was trained? (COCO)

Thanks

Could you explain a bit about what you mean by “in-built batchnorm”?
Did you copy the running stats from the BatchNorm layers from the pre-trained model or just the weights?