What happens if you do
torch.save(model.state_dict(),'model.pth')

If that still gives and error, can you report what the model.state_dict() contains, and we might be able to spot something weird in there