fra31 / auto-attack

Code relative to "Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks"
https://arxiv.org/abs/2003.01690
MIT License
639 stars 111 forks source link

return y_adv #67

Closed MariaMsu closed 3 years ago

MariaMsu commented 3 years ago

I consider that adversarial labels are useful (For example I print them in my visualisations). And Auto-attack compute the labels but does not return the result to the outside. It would be not effective to compute the labels again by hand after Auto-attack returns the images. So I made a change to get the labels directly from the tool

fra31 commented 3 years ago

Hi,

thanks for the contribution! I think it makes sense, but I'd leave returning the labels as optional, especially for backward compatibility. What about adding a flag return_labels, with default value False, to run_standard_evaluation arguments, and then

if not return_labels:
    return x_adv
else:
    return x_adv, y_adv

and similarly for the individual evaluation?

MariaMsu commented 3 years ago

Ok. I will add the flag )

MariaMsu commented 3 years ago

Not as elegant as I would like. But it works

fra31 commented 3 years ago

Sorry for the long delay. Thanks again for the contribution!