Skip to content

Commit

Permalink
YOLOv5 OpenVINO PyTorch Hub inference fix (#7826)
Browse files Browse the repository at this point in the history
Resolves bug report #7817
  • Loading branch information
glenn-jocher committed May 15, 2022
1 parent 8aa2085 commit 1e112ce
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 @@ -39,7 +39,7 @@ def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbo

check_requirements(exclude=('tensorboard', 'thop', 'opencv-python'))
name = Path(name)
path = name.with_suffix('.pt') if name.suffix == '' else name # checkpoint path
path = name.with_suffix('.pt') if name.suffix == '' and not name.is_dir() else name # checkpoint path
try:
device = select_device(('0' if torch.cuda.is_available() else 'cpu') if device is None else device)

Expand Down

0 comments on commit 1e112ce

Please sign in to comment.