Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

404 error when pulling model from hub #20

Open
saarimrahman opened this issue Oct 22, 2021 · 7 comments
Open

404 error when pulling model from hub #20

saarimrahman opened this issue Oct 22, 2021 · 7 comments

Comments

@saarimrahman
Copy link

I'm trying to pull resnext101_32x48d with the following code:

model = torch.hub.load('facebookresearch/WSL-Images', 'resnext101_32x48d_wsl')

but am receiving the following error

Downloading: "https://github.com/facebookresearch/WSL-Images/archive/master.zip" to /tmp/cache/torch/hub/master.zip
...
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
@Gao-JT
Copy link

Gao-JT commented Nov 1, 2021

I have the same problem. Hope you can help to solve it. Looking forward to your reply!

@Gao-JT
Copy link

Gao-JT commented Nov 1, 2021

I have solved this problem. @saarimrahman The solution is:
a. manually download this code
b. unzip and put it under ~/.cache/torch/hub/
c. finally rename it to facebookresearch_WSL-Images_master. Then you can run your code successfully.

@naeem7789
Copy link

@Gao-JT we are facing the same problem.
Can you elaborate where we have to create that ~/.cache/torch/hub/?

@naeem7789
Copy link

We are running the code on kaggle.com notebook

@saarimrahman
Copy link
Author

I ended up resolving this by downloading the checkpoint for the model from this repo, and copying over the model instantiation & definition from here. Then once I instantiated the model, I loaded the weights using the checkpoint I downloaded.

@Gao-JT
Copy link

Gao-JT commented Nov 2, 2021

@naeem7789 Hello, my code ran on the desktop, which may be a little different from your situation. When you use the code 'torch.hub.load()' to create the pre-trained model, the folder ‘ ~/.cache/torch/hub/’ will be created automatically to store the downloaded files and the pre-trained model checkpoint.
image
If your code is run on kaggle.com notebook, I think you can do the following:
a. Copy the code into your own code
b. Use the function resnext101_32x48d_wsl() copied into your code to replace the code ‘model = torch.hub.load('facebookresearch/WSL-Images', 'resnext101_32x48d_wsl')’ to load the pre-trained model.
If you still have questions, you can continue to contact me. Good luck !

@naeem7789
Copy link

naeem7789 commented Nov 2, 2021

@Gao-JT , Thank you Sir , its working

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants