Adapters
English
code
medical
File size: 220 Bytes
455a50b
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
# 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