cannot download, how to change the path?
brandon0824 opened this issue · comments
Hello, I would like to ask if using this code
from resnest.torch import resnest50
net = resnest50(pretrained=True)
the code will download of the pre-trained model stored on wasabi,
Now I have downloaded the pre-trained model file from elsewhere, how do I change the path from this code?
Because this code will read the pre-trained model from /root/.cache/torch/hub/checkpoints
by default
net = resnest50(pretrained=True)
Please reinstall the newest package on github. The links are already updated.
Thank you so much for your reply.
I ran the command
!pip install resnest --pre
But the error message shows that the old download link is still being used
# test HTTP Status
from resnest.torch import resnest50
net = resnest50(pretrained=True)
Downloading: "https://s3.us-west-1.wasabisys.com/resnest/torch/resnest50-528c19ca.pth" to /root/.cache/torch/hub/checkpoints/resnest50-528c19ca.pth
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
<ipython-input-15-06d7e8179e05> in <module>
1 # test HTTP Status
2 from resnest.torch import resnest50
----> 3 net = resnest50(pretrained=True)
Could you do
pip install git+https://github.com/zhanghang1989/ResNeSt
?
I've done what you said
pip install git+https://github.com/zhanghang1989/ResNeSt
My question is mainly about....Is It use this code to import the pre-trained model?
from resnest.torch import resnest50
net = resnest50(pretrained=True)
Yes, that's correct.
You can also use torch hub:
import torch
# get list of models
torch.hub.list('zhanghang1989/ResNeSt', force_reload=True)
# load pretrained models, using ResNeSt-50 as an example
net = torch.hub.load('zhanghang1989/ResNeSt', 'resnest50', pretrained=True)
The models can also be download manually from:
https://github.com/zhanghang1989/ResNeSt/releases/tag/weights_step1
Thank you so much~