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

Bugfix for CW with less than 10 steps #55

Closed noppelmax closed 2 years ago

noppelmax commented 2 years ago

a % b produces MODULO BY ZERO error for b == 0. Fix this for CW method.

noppelmax commented 2 years ago

Actually the error is ZeroDivisionError: integer division or modulo by zero

Harry24k commented 2 years ago

Thank you for your contribution!