Gpu trained parameters get different when loading on cpu

Hi,

I’m using torch 1.8.1+cu101.
I train model on gpu and save it using torch.save(…) and load it back on cpu using torch.load(…, map_location=‘cpu’).
But the prediction result on cpu is totally different from that on gpu.
I then check the model parameters loaded and the parameters are different on cpu and on gpu.
Why is it?

I’ve already seen

but it still doesn’t work.

Thanks

Could you post the model definition as well as a minimal code snippet to reproduce the issue of the non-matching parameters, please?