Skip to content
New issue

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

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

Already on GitHub? # to your account

CCT model urls not found #8

Open
PHChenGit opened this issue Dec 22, 2024 · 2 comments
Open

CCT model urls not found #8

PHChenGit opened this issue Dec 22, 2024 · 2 comments

Comments

@PHChenGit
Copy link

PHChenGit commented Dec 22, 2024

Hi,

I tried to run the following command
python3 finetune.py --datasets_folder=./datasets_vg/datasets --dataset_name=pitts30k --epochs_num=40 --resume_fe=./output/pretrained_model/CCT14_pitts30k.pth --resume_hr=./output/pretrained_model/initializedDHE.torch

But there are some errors.

Traceback (most recent call last):
  File "/home/rvl1421/Documents/rvl/DHE-VPR/finetune.py", line 53, in <module>
    features_extractor = network.FeaturesExtractor(args)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rvl1421/Documents/rvl/DHE-VPR/network.py", line 60, in __init__
    backbone = cct_14_7x2_384(pretrained=True, progress=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rvl1421/Documents/rvl/DHE-VPR/model/cct/cct.py", line 345, in cct_14_7x2_384
    return cct_14('cct_14_7x2_384', pretrained, progress,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rvl1421/Documents/rvl/DHE-VPR/model/cct/cct.py", line 150, in cct_14
    return _cct(arch, pretrained, progress, num_layers=14, num_heads=6, mlp_ratio=3, embedding_dim=384,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rvl1421/Documents/rvl/DHE-VPR/model/cct/cct.py", line 120, in _cct
    state_dict = load_state_dict_from_url(model_urls[arch],
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rvl1421/miniconda3/envs/dhe/lib/python3.12/site-packages/torch/hub.py", line 868, in load_state_dict_from_url
    download_url_to_file(url, cached_file, hash_prefix, progress=progress)
  File "/home/rvl1421/miniconda3/envs/dhe/lib/python3.12/site-packages/torch/hub.py", line 708, in download_url_to_file
    u = urlopen(req)
        ^^^^^^^^^^^^
  File "/home/rvl1421/miniconda3/envs/dhe/lib/python3.12/urllib/request.py", line 215, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rvl1421/miniconda3/envs/dhe/lib/python3.12/urllib/request.py", line 521, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/rvl1421/miniconda3/envs/dhe/lib/python3.12/urllib/request.py", line 630, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/home/rvl1421/miniconda3/envs/dhe/lib/python3.12/urllib/request.py", line 559, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rvl1421/miniconda3/envs/dhe/lib/python3.12/urllib/request.py", line 492, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/home/rvl1421/miniconda3/envs/dhe/lib/python3.12/urllib/request.py", line 639, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Condition Intercepted

Can I download this model from huggingface?

@Lu-Feng
Copy link
Owner

Lu-Feng commented Dec 22, 2024

Hello, I just updated the download link. Please try again using the new code.

@PHChenGit
Copy link
Author

Hi,

It works! Thanks for your reply and sharing.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants