Caroline Mai Chan commited on
Commit
0b818e9
1 Parent(s): 3984452

torch load cpu

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -83,7 +83,7 @@ class Generator(nn.Module):
83
  return out
84
 
85
  model = Generator(3, 1, 3)
86
- model.load_state_dict(torch.load('model.pth'))
87
  model.eval()
88
 
89
  def predict(input_img):
 
83
  return out
84
 
85
  model = Generator(3, 1, 3)
86
+ model.load_state_dict(torch.load('model.pth', map_location=torch.device('cpu')))
87
  model.eval()
88
 
89
  def predict(input_img):