title: Viewing Pytorch weights from a *.pth file
body: <p>I have a <strong>.pth</strong> file created with Pytorch with weights. How would I be able to view the weights from this file?</p>
  <p>I tried this code to load and view but it was not working (as a newbie, I might be entirely wrong)-</p>
  <pre><code>import torch
  import torchvision.models as models
  
  torch.save('weights\kharif_crops_final.pth')
  
  models.load_state_dict(torch.load('weights\kharif_crops_final.pth'))
  models.eval()
  print(models)
  </code></pre>