Open giorgiopiras opened 11 months ago
hi,I wonder if you met question like this :
when I do the step of "python compute_saliency.py":
Traceback (most recent call last):
File "compute_saliency.py", line 129, in
I guess it supposed to be the problem of pytorch version or something ,but I am not sure.If convenient ,could you show your visual vironment?Thank you for your help!!!!
Hi @billy1902. Unfortunately, I do not remember if I have encountered this error. I managed to run the code, but my problem was that the loss wouldn't go down with the specified hyperparameters...and even standard fixes such as a smaller learning rate wouldn't solve the problem. If you want to have access to more pruned model you can also check my new repo at https://github.com/pralab/AdversarialPruningBenchmark Here the idea is to store and benchmark pruned models. However, since I could not fit the models properly, the MAD models are not there.
Best, Giorgio
Hi @ByungKwanLee and thanks for your work on this repo. I was trying to reproduce some experiments, and if I understood correctly, the MAD pipeline works as follows: 1-Clean pre-training of the model with
main_pretrain.py
. 2-Robust training of the model withmain_robustobj_pretrain.py
(either trades, at or mart). 3-Saliency computation withcompute_saliency.py
4-Pruning (and fine-tuning as well) withmain_mad_pretrain.py
.Problem
While step-1 works just fine, I reckon step-2 simply doesn't. With any kind of robust objective you choose, when using the PGD attack, the training process won't reduce the loss. As a matter of fact, accuracy gets stuck at around 10%. It looks like the attack is just too powerful, except it's not, it's tuned with your default PGD parameters.
When changing the attack to (say) FGSM, the training will work, meaning that the evaluation throughout training looks fine... but the network will then learn only on the attack samples and won't generalize to clean ones. Also, alternating two epochs (1 clean, 1 adv) won't solve the issue.
Question
I was wondering whether you faced the same issues, and how did you make your code work for the paper's experiments. I am not sure if this is a problem with torchattacks, honestly. Thanks
Log from: Adversarial Training with PGD on ResNet-18
The training gets stuck as such: