Skip to content

Commit

Permalink
fix device
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Dec 1, 2021
1 parent 7efd520 commit eac3c03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hubconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbo
device = select_device(('0' if torch.cuda.is_available() else 'cpu') if device is None else device)

if pretrained and channels == 3 and classes == 80:
model = DetectMultiBackend(path, device='cpu') # download/load FP32 model
model = DetectMultiBackend(path, device=device) # download/load FP32 model
else:
cfg = list((Path(__file__).parent / 'models').rglob(f'{path.name}.yaml'))[0] # model.yaml path
model = Model(cfg, channels, classes) # create model
Expand Down

0 comments on commit eac3c03

Please sign in to comment.