Hi,
I think you have misunderstood. I was already using model.eval() for both models; the issue was that, while the models parameters were indeed the same, their running mean and running var values of their batch normalization layers were not the same.
So when you have batch normalization layers, to determine whether two models are the same you can’t just check the parameters of the model, but also the running mean and running var of the batch normalization layers.
Or in general just check the state_dict that contains everything