psandovalsegura / pytorch-gd-uap

Generalized Data-free Universal Adversarial Perturbations in PyTorch
MIT License
17 stars 0 forks source link

Error downloading the pre-training model #2

Open Aristozhang opened 3 years ago

Aristozhang commented 3 years ago

Error while downloading model and prompt message that “torch\serialization.py", line 779, in _legacy_load deserialized_objects[key]._set_from_file(f, offset, f_should_read_directly) RuntimeError: unexpected EOF, expected 4596160 more bytes. The file might be corrupted.”

psandovalsegura commented 3 years ago

Hi, this is probably because the downloaded file in your TORCH_HUB_DIR is corrupted. You can try deleting the cached model weights file in TORCH_HUB_DIR, then try adding the download=True param to all the cases within get_model().