glenn-jocher
commited on
Commit
•
1e112ce
1
Parent(s):
8aa2085
YOLOv5 OpenVINO PyTorch Hub inference fix (#7826)
Browse files- hubconf.py +1 -1
hubconf.py
CHANGED
@@ -39,7 +39,7 @@ def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbo
|
|
39 |
|
40 |
check_requirements(exclude=('tensorboard', 'thop', 'opencv-python'))
|
41 |
name = Path(name)
|
42 |
-
path = name.with_suffix('.pt') if name.suffix == '' else name # checkpoint path
|
43 |
try:
|
44 |
device = select_device(('0' if torch.cuda.is_available() else 'cpu') if device is None else device)
|
45 |
|
|
|
39 |
|
40 |
check_requirements(exclude=('tensorboard', 'thop', 'opencv-python'))
|
41 |
name = Path(name)
|
42 |
+
path = name.with_suffix('.pt') if name.suffix == '' and not name.is_dir() else name # checkpoint path
|
43 |
try:
|
44 |
device = select_device(('0' if torch.cuda.is_available() else 'cpu') if device is None else device)
|
45 |
|