Skip to content

Commit

Permalink
Update hubconf.py
Browse files Browse the repository at this point in the history
Re issue ultralytics#3889, added code to download model.pt files into ~/.cache/torch/hub/ultralytics_yolov5_master/ instead of  ~.
  • Loading branch information
johnohagan committed Jul 6, 2021
1 parent 33202b7 commit 4e853f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hubconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbo
check_requirements(requirements=Path(__file__).parent / 'requirements.txt',
exclude=('tensorboard', 'thop', 'opencv-python'))
set_logging(verbose=verbose)


name = ''.join((str(Path(__file__).parent), '/', name))
fname = Path(name).with_suffix('.pt') # checkpoint filename
try:
device = select_device(('0' if torch.cuda.is_available() else 'cpu') if device is None else device)
Expand Down

0 comments on commit 4e853f7

Please sign in to comment.