import torch


def load_model(filename, model):
    """Load the model parameters in {filename}."""
    model_params = torch.load(str(filename))
    model.load_state_dict(model_params)
    return model