EricDai0 / advdiff

MIT License
20 stars 3 forks source link

Questions about the transform method. #2

Closed Ace0001 closed 10 months ago

Ace0001 commented 10 months ago

Thank you for your work. While running the code, I observed that the transform method in the code (ResNet50_Weights.DEFAULT.transforms()) doesn't seem to reflect the image to (0,1). It's noticeable that without using the transform method before classification, the accuracy reaches 100% instead of 0%. I would greatly appreciate your insights on how to explain these results.

EricDai0 commented 10 months ago

I believe all of the adversarial attack methods require the same transformation function for performing attacks. You can use your transformation function in the code. However, the transformation function should be the same for testing the attack image as they take part in the gradient backpropagation.

Ace0001 commented 10 months ago

Ok, thanks for your help.