Harry24k / adversarial-attacks-pytorch

PyTorch implementation of adversarial attacks [torchattacks].
https://adversarial-attacks-pytorch.readthedocs.io/en/latest/index.html
MIT License
1.79k stars 338 forks source link

How can I attack a image which under normalization? #68

Closed CHENBIN99 closed 2 years ago

CHENBIN99 commented 2 years ago

How can I add perturbation on a image which process by normalization from dataloader. Many model was trained under norm, so I must keep this processing. I have saw the comments in the code:

images: :math:(N, C, H, W) where N = number of batches, C = number of channels, H = height and W = width. It must have a range [0, 1]. It means that it is not supported the norm yet?