medmac01 commited on
Commit
0b16ac5
1 Parent(s): 1f7998d

map weights to cpu

Browse files
Files changed (1) hide show
  1. model.py +1 -1
model.py CHANGED
@@ -76,7 +76,7 @@ class AdaptationLayer(nn.Module):
76
 
77
  adapt_model = AdaptationLayer(768,768)
78
  adapt_model.to(device)
79
- state_dict = torch.load('weights/checkpoint_9.pth')
80
  adapt_model.load_state_dict(state_dict)
81
 
82
  from Multilingual_CLIP.multilingual_clip import pt_multilingual_clip
 
76
 
77
  adapt_model = AdaptationLayer(768,768)
78
  adapt_model.to(device)
79
+ state_dict = torch.load('weights/checkpoint_9.pth', map_location=torch.device('cpu'))
80
  adapt_model.load_state_dict(state_dict)
81
 
82
  from Multilingual_CLIP.multilingual_clip import pt_multilingual_clip