Closed verazuo closed 2 years ago
Can you plz follow the implementation procedure described in the README.md. You should first generate the adversarial perturbations and then run analomy(array) function.
python -u detect_main.py --sp 0 --ep 10 --cuda 0 --task cifar10
Hi Junfeng,
Thank you for your response. Yes, I follow the instruction of the README.md and run the following commands.
python -u detect_main.py --sp 0 --ep 10 --cuda 0 --task cifar10
The adversarial perturbations are also generated and successfully loaded in outlier.py
.
What confuses me is that, if you look at the get_s()
function I mentioned above, the return variable s
has never been used after initialization (line 28).
Though there is a loop that does some calculations, but the results are stored in the matrix variable coll
.
I am wondering if any lines are accidentally missed. Maybe a formula that would transfer the variable coll
to s
?
Best wishes, Vera
Sorry for confusing you. You are right. I will update the corrected Code ASAP
Thanks for your correction, i have updated by : adding s[i]+=v below. Plz see my updated code
https://github.com/JunfengGo/AEVA-Blackbox-Backdoor-Detection-main/blob/9e2fc44573f665097bd555abbc3ffb1ef06fee0c/outlier.py#L18-L38
Hi,
Thanks for sharing this wonderful work!
I am trying to reproduce the results. And I found the function
def get_s(num_labels)
which is used to calculate GAP value only returns a zero array because it has never been used after initialization. This would then causes the failure of theanalomy(array)
function.Would you please check the code?
Best wishes, Vera