safinal commited on
Commit
38b5db9
Β·
verified Β·
1 Parent(s): ca23554

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +1 -1
model.py CHANGED
@@ -21,4 +21,4 @@ class Model(torch.nn.Module):
21
  torch.save(self.state_dict(), path)
22
 
23
  def load(self, path):
24
- self.load_state_dict(torch.load(path, weights_only=True))
 
21
  torch.save(self.state_dict(), path)
22
 
23
  def load(self, path):
24
+ self.load_state_dict(torch.load(path, weights_only=True, map_location=torch.device('cpu')))