Code Monkey home page Code Monkey logo

Comments (12)

xieshisheng avatar xieshisheng commented on August 17, 2024 2

I found, set c to 10 or up(1 is not enough), CW attack can changed image to adversarial image with high success rate

from adversarial-attacks-pytorch.

Harry24k avatar Harry24k commented on August 17, 2024

Please let me know the error situation.

from adversarial-attacks-pytorch.

xuxiangsun avatar xuxiangsun commented on August 17, 2024

Sir, I also encounter this issue, I found when I use the parameters default in your code, the success rate of adversarial attack is close to 0. Cause I do not check the original paper about C&W, so I am not sure how to do. Can you help me ? @Harry24k

from adversarial-attacks-pytorch.

Harry24k avatar Harry24k commented on August 17, 2024

Sir, I also encounter this issue, I found when I use the parameters default in your code, the success rate of adversarial attack is close to 0. Cause I do not check the original paper about C&W, so I am not sure how to do. Can you help me ? @Harry24k

With default c, you can't easily get adversarial images. Set higher c like 1.

I also used c=1 in the demo.

from adversarial-attacks-pytorch.

xuxiangsun avatar xuxiangsun commented on August 17, 2024

from adversarial-attacks-pytorch.

xieshisheng avatar xieshisheng commented on August 17, 2024

set c like 1, I tried, but the code doesn't work too.I also check the souce code, i found the source code are not wrong.So i dont know where is wrong.

from adversarial-attacks-pytorch.

xuxiangsun avatar xuxiangsun commented on August 17, 2024

Let me try, thanks for your precious experience! @xieshisheng

from adversarial-attacks-pytorch.

xuxiangsun avatar xuxiangsun commented on August 17, 2024

By the way, sir, how do you set iters and lr? @xieshisheng

from adversarial-attacks-pytorch.

xieshisheng avatar xieshisheng commented on August 17, 2024

I dont change iters and lr.
source code
"loss1 = nn.MSELoss(reduction='sum')(a, images)
loss2 = torch.sum(self.c*f(a))"
i think MSEELoss force new image as same as old image, if c is small ,gradient of loss2 is small . So the "adversarial" image is just as same as image, but not truly adversarial image.

from adversarial-attacks-pytorch.

xuxiangsun avatar xuxiangsun commented on August 17, 2024

from adversarial-attacks-pytorch.

xieshisheng avatar xieshisheng commented on August 17, 2024

hhhhh, maybe large iteration is more effective.I‘ll try it later.thank you

from adversarial-attacks-pytorch.

xuxiangsun avatar xuxiangsun commented on August 17, 2024

from adversarial-attacks-pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.