hcguoO0 / FIA

code for "Feature Importance-aware Transferable Adversarial Attacks"
76 stars 15 forks source link

low attack success rate(攻击成功率不正常的低) #13

Open bl4bl4hhh opened 2 years ago

bl4bl4hhh commented 2 years ago

Hi! Thanks for your contribution! But when I run the command line you mentioned in readme file "python attack.py --model_name vgg_16 --attack_method FIAPIM --layer_name vgg_16/conv3/conv3_3/Relu --ens 30 --probb 0.7 --amplification_factor 2.5 --gamma 0.5 --Pkern_size 3 --image_size 224 --image_resize 250 --prob 0.7 --output_dir ./adv/FIAPIDIM/" and "python verify.py --ori_path ./dataset/images/ --adv_path ./adv/FIAPIDIM/ --output_file ./log.csv". I got adv_acc around 70%-80% and adv_succ around 20%-30%. Is there something wrong with your defulat parameter? 在运行readme里面提到的指令时,仅仅得到20%-30%的准确率,请问是否是默认参数不小心给错了呢?还是什么其他问题?

030f3af4c0a5769afe342ce01736def
hcguoO0 commented 2 years ago

image 这个地方其实应该是FIAPIDIM。但是我用FIAPIM也能得出高攻击成功率,所以我想问你有改过代码吗?

bl4bl4hhh commented 2 years ago

欸 没有欸...就是先跑的attack再跑的verify

bl4bl4hhh commented 2 years ago

请问你跑的两条指令就是上面的两条吗?除了两条中的output_dir都改成FIAPIM之外~

bl4bl4hhh commented 2 years ago

我重新下载了一遍代码重新跑了一遍 好像结果还是不理想 attack:

b113323fdc9efeb57c80df5628caab2

verify:

d6bb35d2ab877c5f474702d96aeb1b1 4f077e449a897750004fafa30b6ef0a
hcguoO0 commented 2 years ago

我也重新下载跑了一遍,但效果也还行呀。难道环境问题?你的tensorflow是哪个版本的?

bl4bl4hhh commented 2 years ago

啊那好奇怪嗷 tf是1.15的 cuda 10.0 cudnn 7.5

hcguoO0 commented 2 years ago

请问你这个问题解决了吗,你要不要把tf版本降低点试试?(抱歉,前一阵子有点忙,没有及时回复)

233enter commented 2 years ago

用的是不是30系显卡? 30系显卡不支持cuda11以下的版本 换cpu或低版本的显卡可能会解决问题