map weights to cpu
Browse files
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
|