File tree Expand file tree Collapse file tree 6 files changed +24
-21
lines changed Expand file tree Collapse file tree 6 files changed +24
-21
lines changed Original file line number Diff line number Diff line change 11Running scripts
22===============
33The library contains three main scripts for:
4+
45* training a classifier using (`train.py `)
56* crafting adversarial examples on a trained model through (`generate_adversarial.py `)
67* testing model accuracy on different test sets using (`test_accuracies.py `)
@@ -18,6 +19,7 @@ Some examples of how to use the toolbox when writing your own code can be found
1819See `examples/README.md ` for more information about what each example does. To run an example, use the following command:
1920
2021.. code-block :: bash
22+
2123 python3 examples/< example_name> .py
2224
2325 .. _GitHub : https:github.com/IBM/adversarial-robustness-toolbox
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ The Adversarial Robustness Toolbox contains implementations of the following att
2323* Jacobian Saliency Map (`Papernot et al., 2016 `_)
2424* Universal Perturbation (`Moosavi-Dezfooli et al., 2016 `_)
2525* Virtual Adversarial Method (`Moosavi-Dezfooli et al., 2015b `_)
26- * C& W Attack (`Carlini and Wagner, 2016 `_)
26+ * C&W Attack (`Carlini and Wagner, 2016 `_)
2727* NewtonFool (`Jang et al., 2017 `_)
2828
2929The following defense methods are also supported:
Original file line number Diff line number Diff line change 11:mod: `src.classifiers `
22======================
33.. automodule :: src.classifiers
4-
5- Supported models
6- ----------------
7- .. autoclass :: Classifier
8- :members:
9- .. autoclass :: CNN
10- :members:
11- .. autoclass :: MLP
12- :members:
13- .. autoclass :: ResNet
14- :members:
Original file line number Diff line number Diff line change 22==================
33.. automodule :: src.metrics
44
5- Model robustness metrics
6- ------------------------
5+ Loss Sensitivity
6+ ----------------
77.. autofunction :: loss_sensitivity
8+
9+ Empirical Robustness
10+ --------------------
811.. autofunction :: empirical_robustness
12+
13+ Distance to nearest neighbors
14+ -----------------------------
915.. autofunction :: nearest_neighbour_dist
16+
17+ CLEVER
18+ ------
1019.. autofunction :: clever_u
1120.. autofunction :: clever_t
Original file line number Diff line number Diff line change 11:mod: `src.utils `
22================
33.. automodule :: src.utils
4- Functions
5- ---------
4+
5+ Load Dataset
6+ ------------
7+ .. autofunction :: load_dataset
8+
9+ Random Targets
10+ --------------
611.. autofunction :: random_targets
12+
13+ Preprocess
14+ ----------
715.. autofunction :: preprocess
8- .. autofunction :: load_dataset
Original file line number Diff line number Diff line change 22Classifier API for applying all attacks. Use the :class:`Classifier` wrapper to be able to apply an attack to a
33preexisting model.
44"""
5- from src .classifiers .classifier import Classifier
6- from src .classifiers .cnn import CNN
7- from src .classifiers .mlp import MLP
8- from src .classifiers .resnet import ResNet
You can’t perform that action at this time.
0 commit comments