yichen-purdue commited on
Commit
62745e5
1 Parent(s): 9b7392f

change to cpu

Browse files
Files changed (1) hide show
  1. model_utils.py +1 -1
model_utils.py CHANGED
@@ -42,7 +42,7 @@ def load_model(config: str, weight: str, model_def, device):
42
 
43
  opt = parse_configs(config)
44
  model = model_def(opt)
45
- cp = torch.load(weight)
46
 
47
  models = model.get_models()
48
  for k, m in models.items():
 
42
 
43
  opt = parse_configs(config)
44
  model = model_def(opt)
45
+ cp = torch.load(weight, map_location=device)
46
 
47
  models = model.get_models()
48
  for k, m in models.items():