Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@glenn best practices for running trained YOLOv5 models in new python environments is to use PyTorch Hub. See PyTorch Hub Tutorial: #1789

Closed
BruceYangxl opened this issue Dec 27, 2020 · 2 comments
Labels
Stale Stale and schedule for closing soon

Comments

@BruceYangxl
Copy link

@Glenn but when I use "torch.hub.load" to load my own model weights, it raises an error "RuntimeError: Cannot find callable custom in hubconf"

@glenn-jocher
Copy link
Member

glenn-jocher commented Dec 27, 2020

@BruceYangxl your cache is out of date (you are using old code). use force_reload=True as shown in PyTorch Hub tutorial:
https://docs.ultralytics.com/yolov5

Force Reload

If you run into problems with the above steps, setting force_reload=True may help by discarding the existing cache and force a fresh download of the latest YOLOv5 version from PyTorch Hub.

model = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True, force_reload=True)  # force reload

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale Stale and schedule for closing soon label Jan 27, 2021
@github-actions github-actions bot closed this as completed Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Stale and schedule for closing soon
Projects
None yet
Development

No branches or pull requests

2 participants