-
Notifications
You must be signed in to change notification settings - Fork 79
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
Test with the reprocessed image #1
Comments
By 'reprocessed image' do you mean image with preprocessing undone?
…On Wed, Dec 12, 2018, 8:56 AM juicecwc ***@***.***> wrote:
Hi, great repo!
I am little confused with this line
https://github.com/sarathknv/adversarial-examples-pytorch/blob/54887aa583ee19e94fc95e23684271019eecdd68/fgsm.py#L84
As far as I know, it is more reasonable to test with the reprocessed image
rather than inp.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AQ59I3mu4eJOTlNGoc_kW7QM9cmw7Erpks5u4HdigaJpZM4ZOqdc>
.
|
No, what I mean is the adversarial image. Better viewed in the following code. adv = inp.data.cpu().numpy()[0]
adv = adv.transpose(1, 2, 0)
adv = (adv * std) + mean
adv = np.clip(adv, 0, 1)
adv = (adv - mean) / std # this is what i mean |
You are clipping the adversarial image before inputting to the model, so that after undoing preprocessing it is within the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, great repo!
I am little confused with this line
adversarial-examples-pytorch/fgsm.py
Line 84 in 54887aa
As far as I know, it is more reasonable to test with the reprocessed image rather than
inp
.The text was updated successfully, but these errors were encountered: