BatchNorm doesn’t necessarily generate normalized features, if affine=True.
The additional weights and bias can scale and shift the input again, but that’s only a side note.
During evaluation you should use the running statistics and not calculate the current batch statistics anymore.
You can do this by setting your model to evaluation: model.eval().
The calculation therefore won’t depend on the batch size anymore.