or for example should I use this answer?
  
    
    
    Missing keys & unexpected keys in state_dict when loading self trained model vision
  
  
    I also am facing the same issue. I don’t use nn.DataParallel. 
I am using a slightly modified version of [this repo] in a Kaggle notebook https://github.com/aitorzip/PyTorch-CycleGAN. 
Here’s how I save: 
torch.save({
                'epoch': epoch,
                'model_state_dict': netG_A2B.state_dict(),
                'optimizer_state_dict': optimizer_G.state_dict(),
                'loss_histories': loss_histories,
                }, f'netG_A2B_{epoch:03d}.pth')

Here’s how I load: 
checkp…
  


Can you at a high-level (not code-level) please provide some hint why this answer should work?
I am also loading a torch model like below:
checkpoint = torch.load(args.resume, encoding='latin1')