hcguoO0 / FIA

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

How to craft Fig.3 in your paper? #9

Closed opt0pt closed 2 years ago

opt0pt commented 2 years ago

Thanks for sharing your code. I'm reading your paper and would like to know how to craft Fig.3.

hcguoO0 commented 2 years ago

For raw features, we extract the features of original images in layer Conv3_3 and sum them across channels, and visualize the results (i.e., a 56x56 matrix) as an image. For raw gradients, we calculate the gradients by the formula (2) in our paper and also sum them across channels, and visualize the results. For aggregate features, we extract the features of multiple different masked images in layer Conv3_3, and sum the multiple features, and then sum the result across channels, and visualize them. For aggregate gradients, we calculate the gradients by the formula (2) for the multiple different masked images, and sum the multiple gradients, and then sum the result across channels, and visualize them.

opt0pt commented 2 years ago

Got it, thx!