Complete the code to save the model's state dictionary to a file.
torch.save(model.[1](), 'model.pth')
The state_dict() method returns the model's parameters as a dictionary, which is what we save.
Complete the code to load the saved state dictionary into the model.
model.load_state_dict(torch.[1]('model.pth'))
The torch.load() function loads the saved dictionary from the file.
Fix the error in saving the model's state dictionary by completing the code.
torch.save([1], 'model.pth')
Only model.state_dict() returns the dictionary of parameters suitable for saving.
Fill both blanks to save the model's state dictionary and then load it back.
torch.[1](model.[2](), 'model.pth') model.load_state_dict(torch.load('model.pth'))
Use torch.save to save and model.state_dict() to get the parameters.
Fill all three blanks to save the model's state dictionary, load it, and update the model.
torch.[1](model.[2](), 'model.pth') loaded_dict = torch.[3]('model.pth') model.load_state_dict(loaded_dict)
First save with torch.save, get parameters with state_dict(), then load with torch.load.