CUHKWilliam commited on
Commit
6bd32e7
·
verified ·
1 Parent(s): 5f5377c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -24,7 +24,7 @@ def inference_mask1(
24
  model = DCAMA('resnet50', 'resnet50_a1h-35c100f8.pth', True)
25
  model.eval()
26
  model.cpu()
27
- state_dict = torch.load('model_45.pt')
28
  if 'state_dict' in state_dict.keys():
29
  state_dict = state_dict['state_dict']
30
  state_dict2 = {}
 
24
  model = DCAMA('resnet50', 'resnet50_a1h-35c100f8.pth', True)
25
  model.eval()
26
  model.cpu()
27
+ state_dict = torch.load('model_45.pt', map_location=torch.device('cpu'))
28
  if 'state_dict' in state_dict.keys():
29
  state_dict = state_dict['state_dict']
30
  state_dict2 = {}