Pytorch model save

I have two models then how could I save the models parameter?
torch.save(model1.state_dict(), 'model1_parameter_save_path') torch.save(model2.state_dict(), 'model2_parameter_save_path')
Do I understand it right??

Yes. More info on the other ways to do this here

1 Like