-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Divide by zero #15
Comments
Hi, @akshayag! Thanks for letting us know! I'll add a small tolerance constant to avoid divide by 0 warnings. |
Please write some instructions to use other attack methods also. For example, I am getting the error when trying to run the attack CarliniL2Method x_train_adv = adv_crafter.generate(x_train) Similarly, if there will be an example line for other methods also to craft the adversary. |
We will try to provide more examples. Meanwhile, for your current error, as per CarliniL2Method documentation, you either need to set |
Please take a look at this error also. Create VirtualAdversarialMethod attack Craft attack on training examples |
@akshayag Fix for both divide by 0 issues is pushed. Please confirm that the warning is gone. |
Hello,
Was running the code on CIFAR for 150 epochs and with batch size 32
Craft attack on training examples
/adversarial-robustness-toolbox-master/art/attacks/deepfool.py:84: RuntimeWarning: divide by zero encountered in true_divide
r = (abs(f_diff[l]) / pow(np.linalg.norm(grad_diff[l]), 2)) * grad_diff[l]
/adversarial-robustness-toolbox-master/art/attacks/deepfool.py:84: RuntimeWarning: invalid value encountered in multiply
r = (abs(f_diff[l]) / pow(np.linalg.norm(grad_diff[l]), 2)) * grad_diff[l]
The text was updated successfully, but these errors were encountered: