ossaili
na
9b43cf7
raw
history blame contribute delete
239 Bytes
import torch
def save_model(model):
torch.save(model.state_dict(), 'model_weights.pth')
def load_model(model):
return model.load_state_dict(torch.load('./models/model_weights_27_styles.pth', map_location=torch.device('cpu')))