Skip to content

Commit

Permalink
cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
kwea123 committed Jul 20, 2022
1 parent 585cdba commit 9c98a72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def load_ckpt(model, ckpt_path, model_name='model', prefixes_to_ignore=[]):


def slim_ckpt(ckpt_path):
ckpt = torch.load(ckpt_path)
ckpt = torch.load(ckpt_path, map_location='cpu')
# pop unused parameters
keys_to_pop = []
for k in ckpt['state_dict']:
Expand Down

0 comments on commit 9c98a72

Please sign in to comment.