Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why you set "target_sigma = args.sigma * 2" in certify.py(line 20)? #2

Open
ChoiDae1 opened this issue Aug 1, 2023 · 4 comments
Open

Comments

@ChoiDae1
Copy link

ChoiDae1 commented Aug 1, 2023

Hello! Can you explain why you set target_sigma = args.sigma*2 (multiply 2)?
In my opinion, target_sigma = args.sigma**2 (power 2) is correct.

Thank you!

@Eric-mingjie
Copy link
Collaborator

Hi, Thanks for your interest in our work. We use args.sigma*2 because the image we loaded is in range of [-1,1]. Thus the corresponding sigma (for image with pixel range [0,1]) needs to be multiplied by 2 to match the normalized images.

@ChoiDae1
Copy link
Author

ChoiDae1 commented Aug 1, 2023

Thank you for answering!
Then, can you explain why you use args.sigma(not args.sigma*2) when computing certified radius?

@Eric-mingjie
Copy link
Collaborator

In the original randomized smoothing paper, the certified radius proposed in equation 3 use just sigma. I don't know where you get the impression that sigma**2 is needed, can you point me to a reference?

@ChoiDae1
Copy link
Author

ChoiDae1 commented Aug 1, 2023

I was confused for a second. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants