Hi,
I would like to use torchvision pretrained models in adversarial attacks.
These models require some preprocessing (e.g. switch to GBR, subtract mean, divide std, etc.)
The main essence of adversarial attacks is that we add the grad to the input. The modified input can be now either fed back into the model, which would cause it to fail OR visualized to the human user, which won’t notice the difference.
The thing is that the preprocessing actions on the input require reverse postprocessing actions as well which would change the added values (i.e. the input for the model and visualized image won’t be identical).
Is there any way to feed the model the original input instead of the transformed one (so the grad would be in the original RGB format)?
I want to able to compute and add the grad in the right format on the GPU
Please advise
Thanks