Skip to content

Commit

Permalink
Fast Minimum-norm Attack (#628)
Browse files Browse the repository at this point in the history
* feat: add Fast-Minimum-Norm attack

* fix: fixed some problem with tf backend

* docs: added attacks to docs

* test: added tests for FMN

* fix: formatting black

* fix: mypy fixes

* fix: mypy fixes

* fix: improved coverage

* fix: fix error with tf backend

* fix: fix format

* test: do tests on FMN
  • Loading branch information
maurapintor committed Jun 4, 2021
1 parent cc7499c commit 91ecafc
Show file tree
Hide file tree
Showing 4 changed files with 613 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/modules/attacks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
L1BrendelBethgeAttack
L2BrendelBethgeAttack
LinfinityBrendelBethgeAttack
L0FMNAttack
L1FMNAttack
L2FMNAttack
LInfFMNAttack

FGM
FGSM
Expand Down Expand Up @@ -93,6 +97,10 @@
.. autoclass:: L1BrendelBethgeAttack
.. autoclass:: L2BrendelBethgeAttack
.. autoclass:: LinfinityBrendelBethgeAttack
.. autoclass:: L0FMNAttack
.. autoclass:: L1FMNAttack
.. autoclass:: L2FMNAttack
.. autoclass:: LInfFMNAttack

.. autoclass:: FGM
.. autoclass:: FGSM
Expand Down
6 changes: 6 additions & 0 deletions foolbox/attacks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
L2BrendelBethgeAttack,
LinfinityBrendelBethgeAttack,
)
from .fast_minimum_norm import ( # noqa: F401
L0FMNAttack,
L1FMNAttack,
L2FMNAttack,
LInfFMNAttack,
)
from .gen_attack import GenAttack # noqa: F401

# from .blended_noise import LinearSearchBlendedUniformNoiseAttack # noqa: F401
Expand Down

0 comments on commit 91ecafc

Please sign in to comment.