Harry24k / adversarial-attacks-pytorch

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

What type of object is "images" #87

Closed Lan131 closed 2 years ago

Lan131 commented 2 years ago

Hello, Its unclear to me from your documentation what type of object images and labels are supposed to be? Are they tensors? Or something else. https://adversarial-attacks-pytorch.readthedocs.io/en/latest/_modules/torchattacks/attacks/pgd.html

Framartin commented 2 years ago

@Lan131 images and labels should be pytorch tensors. images should be scaled in [0,1], and the data normalization should be added as an additional layer of the attacked model. You may want to check out the runnable examples in the provided notebooks to have a clearer idea. For example, this one:

https://github.com/Harry24k/adversarial-attacks-pytorch/blob/master/demos/Transfer%20Attack%20(CIFAR10).ipynb