how to save a Pytorch model?
I am new to Deep learning and I want to know, how can I save the final model in Pytorch? I tried some things that were mentioned but I got confused with, how to save the model and how to load it back?

to save:
# save the weights of the model to a .pt file
torch.save(model.state_dict(), &quot;your_model_path.pt&quot;)

to load:
# load your model architecture/module
model = YourModel()
# fill your architecture with the trained weights
model.load_state_dict(torch.load(&quot;your_model_path.pt&quot;))

