bethgelab / foolbox

A Python toolbox to create adversarial examples that fool neural networks in PyTorch, TensorFlow, and JAX
https://foolbox.jonasrauber.de
MIT License
2.78k stars 426 forks source link

Using Foolbox with Huggingface transfomers #736

Closed bakachan19 closed 4 months ago

bakachan19 commented 4 months ago

Hi, I was wondering if is possible to use this library to attack Huggingface transformer models, for example the vit-base-patch16-224 model. If so, could you provide a demo code for doing this?

Thank you. Have a great day!

zimmerrol commented 4 months ago

I don't think one has to do something special about this, as that model is still a PyTorch model, no? In that case, the examples you can find online for using foolbox should apply.

bakachan19 commented 4 months ago

I see, thank you. I will give it a try and see how it works.