Spaces:
Runtime error
Runtime error
Hector Lopez
commited on
Commit
·
f7cb0f8
1
Parent(s):
168c978
Load the checkpoint into the cpu
Browse files
model.py
CHANGED
|
@@ -25,7 +25,7 @@ def get_model(checkpoint_path):
|
|
| 25 |
return model
|
| 26 |
|
| 27 |
def get_checkpoint(checkpoint_path):
|
| 28 |
-
ckpt = torch.load('checkpoint.ckpt')
|
| 29 |
|
| 30 |
fixed_state_dict = collections.OrderedDict()
|
| 31 |
|
|
|
|
| 25 |
return model
|
| 26 |
|
| 27 |
def get_checkpoint(checkpoint_path):
|
| 28 |
+
ckpt = torch.load('checkpoint.ckpt', map_location=torch.device('cpu'))
|
| 29 |
|
| 30 |
fixed_state_dict = collections.OrderedDict()
|
| 31 |
|