I have .pth file which when loaded with torch.load() gives only ‘model’ and ‘opt’.
File is actually build with fastai unet with resnet34.
I don’t know the complete architecture of the model to re-create the model instance.
I tried with
model = torchvision.models.resnet34()
state_dict = torch.load(‘file.pth’)
model.load_state_dict(state_dict)
It’s not working, pth file is not matching with model
links:

  
      
      Dropbox
  
  
    

ColorizeArtistic_gen.pth 10

Shared with Dropbox


  
  
    
    
  
  



  
      
      GitHub
  
  
    

jantic/DeOldify 6

A Deep Learning based project for colorizing and restoring old images (and video!) - jantic/DeOldify