We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72a9c96 commit 1560034Copy full SHA for 1560034
hubconf.py
@@ -65,7 +65,7 @@ def custom(path_or_model='path/to/model.pt', autoshape=True):
65
Returns:
66
pytorch model
67
"""
68
- model = torch.load(path_or_model) if isinstance(path_or_model, str) else path_or_model # load checkpoint
+ model = torch.load(path_or_model, map_location=torch.device('cpu')) if isinstance(path_or_model, str) else path_or_model # load checkpoint
69
if isinstance(model, dict):
70
model = model['ema' if model.get('ema') else 'model'] # load model
71
0 commit comments