Hector Lopez commited on
Commit
f7cb0f8
·
1 Parent(s): 168c978

Load the checkpoint into the cpu

Browse files
Files changed (1) hide show
  1. model.py +1 -1
model.py CHANGED
@@ -25,7 +25,7 @@ def get_model(checkpoint_path):
25
  return model
26
 
27
  def get_checkpoint(checkpoint_path):
28
- ckpt = torch.load('checkpoint.ckpt')
29
 
30
  fixed_state_dict = collections.OrderedDict()
31
 
 
25
  return model
26
 
27
  def get_checkpoint(checkpoint_path):
28
+ ckpt = torch.load('checkpoint.ckpt', map_location=torch.device('cpu'))
29
 
30
  fixed_state_dict = collections.OrderedDict()
31