Open wan3333 opened 7 months ago
Hi @wan3333 , if you are a user in mainland China, please add a proxy when running the demo code...because some of the pre-trained models need to be downloaded from the Google driver.
If not, could you please provide the complete code? 😉
Yes, I have proxy, the complete code is in this repository’s demo directory, you can check it.
------------------ Original ------------------ From: isinstance @.> Date: Mon,Nov 13,2023 1:35 AM To: Harry24k/adversarial-attacks-pytorch @.> Cc: WAN @.>, Mention @.> Subject: Re: [Harry24k/adversarial-attacks-pytorch] The model loading in thedemo seems to have become inactive[BUG] (Issue #166)
Yes, I have proxy, the complete code is in this repository’s demo directory, you can check it. … ------------------ Original ------------------ From: isinstance @.> Date: Mon,Nov 13,2023 1:35 AM To: Harry24k/adversarial-attacks-pytorch @.> Cc: WAN @.>, Mention @.> Subject: Re: [Harry24k/adversarial-attacks-pytorch] The model loading in thedemo seems to have become inactive[BUG] (Issue #166)
I can't reproduce the problem you raised.
I also have this bug
I also have this bug
Which specific file are you having trouble with?
In the demo of White-box Attack on CIFAR10,I download this model,and the content of it is above,so I can't load it.For this problem,i have switched two python version,first one can't download,and second one is the above result. I want to know if it's my operational mistake.
In the demo of White-box Attack on CIFAR10,I download this model,and the content of it is above,so I can't load it.For this problem,i have switched two python version,first one can't download,and second one is the above result. I want to know if it's my operational mistake.
May I ask what is the size of your Standard.pt
file?
I seem to have figured out why, there was a bug in robustbench download function from google driver, and that seems to have just been fixed, but the files included in torchattacks
were not updated to the latest version of robustbench.
Please delete the robustbench
folder in torchattacks
and reclone from this repository https://github.com/RobustBench/robustbench.git, or reinstall it via pip uninstall robustbench
then pip install git+https://github.com/RobustBench/robustbench.git
, then it should work 😘.
In the demo of White-box Attack on CIFAR10,I download this model,and the content of it is above,so I can't load it.For this problem,i have switched two python version,first one can't download,and second one is the above result. I want to know if it's my operational mistake.
do you resolve this problem please?
Hi @Gorgerbin @qqt-code @wan3333 , it seems that the problem is caused by the robustbench
library, so until the problem is fixed upstream, you can test it with this new demo code:
https://colab.research.google.com/drive/1atyo82sYeaZsbudgjt7jo25Cuv6ArzKB?usp=sharing
or here:
new_demo.zip
This requires three files, one for the trained model (resnet18_eval.pth
) and two for the image and label (images.pth
and labels.pth
). These three files you can download from here:
model https://github.com/rikonaka/adversarial-attacks-pytorch/raw/master/code_coverage/resnet18_eval.pth
images https://github.com/rikonaka/adversarial-attacks-pytorch/raw/master/code_coverage/images.pth
labels https://github.com/rikonaka/adversarial-attacks-pytorch/raw/master/code_coverage/labels.pth
😘😘😘
I have the same problem.
In 'robustbench/utils.py': 'response = session.get(url_base, params={'id': gdrive_id}, stream=True)', when downloading the .pt file, google would give the warning info to ask you to confirm. So it downloads a file with html instead of the real pt file.
I have the same problem.
In 'robustbench/utils.py': 'response = session.get(url_base, params={'id': gdrive_id}, stream=True)', when downloading the .pt file, google would give the warning info to ask you to confirm. So it downloads a file with html instead of the real pt file.
You can manually download the .pt file with url "https://docs.google.com/uc?export=download&confirm=t&id={gdrive_id}".
✨ Short description of the bug [tl;dr]
The model loading in the demo seems to have become inactive
💬 Detailed code and results
model = load_model('Standard', norm='Linf').to(device)
It seems cant load the model.