The first saves the entire model file

Torch. Save (model_object, ‘model.pth’) model = torch. Load (‘model.

The second saves only the weights of the model

Save (model_object.state_dict(), ‘weights.pth’) model.load_state_dict(‘weights.pth’))