# utils/helper_functions.py | |
import torch | |
def save_model(model, path): | |
torch.save(model.state_dict(), path) | |
def load_model(model, path): | |
model.load_state_dict(torch.load(path)) | |
model.eval() | |
return model | |
# utils/helper_functions.py | |
import torch | |
def save_model(model, path): | |
torch.save(model.state_dict(), path) | |
def load_model(model, path): | |
model.load_state_dict(torch.load(path)) | |
model.eval() | |
return model | |