here is our way for alexnet trained with pytorch examples imagenet:

  
    
    
    On a cpu device, how to load checkpoint saved on gpu device 
  
  
    We have trained an Alexnet with pytorch examples imagenet (https://github.com/pytorch/examples/blob/master/imagenet/main.py) and have been struggling to convert the model for use on CPU and for inference only. Here is a solution for AlexNet: 
https://github.com/e-lab/pytorch-toolbox/blob/master/convert-save-load.md 
It would be nice to have something more generic…