It should work by setting model.eval(), if you don’t have any other modules, which switch their behavior in train/eval.
However, a cleaner approach would be to just set the BatchNorm layers to eval.
If you have a model definition, something like this should work:
model = MyModel()
model.bn1.eval()