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
  
    
    
    On a cpu device, how to load checkpoint saved on gpu device 
  
  
    I trained my network on a gpu device and saved checkpoint by torch.save 
Loading this checkpoint on my cpu device gives an error: 
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled```
  


but it still doesn’t work.
Thanks