Comments (9)
Fixed in b0ecc55.
from adversarial-robustness-toolbox.
Bug still there (ART version 1.3.1)
Traceback (most recent call last):
File "generate_adv.py", line 194, in <module>
main(args)
File "generate_adv.py", line 175, in main
adv_data = attack.generate(x=x_test, y=y_test)
File "/home/aaldahdo/adv_dnn/venv/lib/python3.8/site-packages/art/attacks/attack.py", line 74, in replacement_function
return fdict[func_name](self, *args, **kwargs)
File "/home/aaldahdo/adv_dnn/venv/lib/python3.8/site-packages/art/attacks/evasion/zoo.py", line 222, in generate
res = self._generate_batch(x_batch, y_batch)
File "/home/aaldahdo/adv_dnn/venv/lib/python3.8/site-packages/art/attacks/evasion/zoo.py", line 263, in _generate_batch
best_dist, best_label, best_attack = self._generate_bss(x_batch, y_batch, c_current)
File "/home/aaldahdo/adv_dnn/venv/lib/python3.8/site-packages/art/attacks/evasion/zoo.py", line 380, in _generate_bss
x_adv = self._optimizer(x_adv, y_batch, c_batch)
File "/home/aaldahdo/adv_dnn/venv/lib/python3.8/site-packages/art/attacks/evasion/zoo.py", line 455, in _optimizer
expanded_x, expanded_x + coord_batch.reshape(expanded_x.shape), expanded_targets, expanded_c,
ValueError: cannot reshape array of size 25165824 into shape (4096,32,32,3)
from adversarial-robustness-toolbox.
Hi @aldahdooh, thank you for your message. I was not able to reproduce your observation with branch dev_1.4.3
based on example get_started_pytorch.pychange to use
ZooAttack`. Could you please provide more details or code example how to reproduce the error?
from adversarial-robustness-toolbox.
For CIFAR-10 dataset with keras model
Note: No error with MNIST
attack = ZooAttack(classifier=kclassifier, batch_size=32)
adv_data = attack.generate(x=x_test, y=y_test)
from adversarial-robustness-toolbox.
Hi @aldahdooh I have tried to reproduce this issue with dev_1.3.1
and dev_1.4.3
using get_started_keras.py
and have not been able to reproduce the issue with the attack definition above for the first 32 test samples. Would you be able to show the entire code example producing this issue?
from adversarial-robustness-toolbox.
Thanks for your reply, Attached is the code. Just run generate_adv.py -d=cifar
. I run it with MNIST and no errors encountered. With CIFAR, the problem came with the last batch iteration.
from adversarial-robustness-toolbox.
Oh, I see, it happens in the last batch iteration, thank you, that's very helpful. Let me try again using your code.
from adversarial-robustness-toolbox.
Hi @aldahdooh I have pushed an update for ZOO to #755 that should fix the issue. If you have time, could you please try it out and let me know if it works for you?
I have noticed that you are creating the attacks in generate_adv.py
with the attack's default arguments which are selected to let the attack run fast but not necessarily very strong.
from adversarial-robustness-toolbox.
Hi @beat-buesser, Many thanks for your feedback. I will do that ASAP since my machine is busy now with other tasks.
And thanks for your note, I do agree with you, I did that to compare with other works that use same settings.
from adversarial-robustness-toolbox.
Related Issues (20)
- Upgrade Pylint Version and Review Required Disable Statements
- Backdoor attack HuggingFace Model Automatic Speech Recognition via HuggingFaceClassifierPytorch ART HOT 5
- .
- Lยน `FGM` is wrong + extend to all p >= 1 HOT 5
- Implement HuggingFace Object Detection Estimators
- Not generating Adversarial examples HOT 1
- PyTorch classes that check torch.optim.lr_scheduler._LRScheduler HOT 1
- AdversarialTrainer parameter name missmatch HOT 2
- Incorrect Documentation regarding attacks.poisoning HOT 1
- Auto PGD not working with DLR loss for binary classification HOT 1
- ERROR collecting tests/attacks/evasion/test_brendel_and_bethge.py
- Measured Linf norm exceeds epsilon for ACG HOT 1
- Risky values in tests
- Gradient Explosion
- Robust
- Rr
- adversarial audio example notebook not giving the same results HOT 2
- Unable to utilize PytorchClassifier for ASR model HOT 1
- List of projects/tools utilising ART [JATIC-I4-IBM]
- Attack > Evasion > Momentum Iterative Method: major issues HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adversarial-robustness-toolbox.