Hi @Pritesh_Gohil , @HaukurPall, sorry for tagging you both here. It seems that you solved the issue I am also having. Some of you said that the saved weight wasn’t saved properly. I am sure that my weight file saved properly, whose size is around 300MB.
I tried both saving options as follows with both filing ways:
        # torch.save(model.state_dict(), '/home/aktaseren/people-torch/pidxx.pt')
        # torch.save(model, '/home/aktaseren/people-torch/pidxx.pth')

However, I am not able to load it via any of these. I am having the same error you got. My main purpose is to convert one Pytorch model to ONXX version in order to use it for Opencv framework.
I would be appreciated if any of you can explain in detail how you solved this.