Skip to content

Commit 2955a5e

Browse files
author
Beat Buesser
committed
Update notebooks
1 parent 4e36cec commit 2955a5e

File tree

35 files changed

+3248
-1557
lines changed

35 files changed

+3248
-1557
lines changed

notebooks/adaptive_defence_evaluations/evaluation_12_EMPIR.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"import numpy as np\n",
4141
"\n",
4242
"from art.estimators.classification import TensorFlowClassifier\n",
43-
"from art.attacks import ProjectedGradientDescent"
43+
"from art.attacks.evasion import ProjectedGradientDescent"
4444
]
4545
},
4646
{
@@ -646,7 +646,7 @@
646646
"name": "python",
647647
"nbconvert_exporter": "python",
648648
"pygments_lexer": "ipython3",
649-
"version": "3.6.10"
649+
"version": "3.7.7"
650650
}
651651
},
652652
"nbformat": 4,

notebooks/adversarial_patch/attack_adversarial_patch.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"from tensorflow.keras.preprocessing import image\n",
3030
"\n",
3131
"from art.estimators.classification import TensorFlowClassifier\n",
32-
"from art.attacks import AdversarialPatch"
32+
"from art.attacks.evasion import AdversarialPatch"
3333
]
3434
},
3535
{
@@ -359,9 +359,9 @@
359359
],
360360
"metadata": {
361361
"kernelspec": {
362-
"display_name": "venv36_TF1_14_keras225",
362+
"display_name": "Python 3",
363363
"language": "python",
364-
"name": "venv36_tf1_14_keras225"
364+
"name": "python3"
365365
},
366366
"language_info": {
367367
"codemirror_mode": {
@@ -373,7 +373,7 @@
373373
"name": "python",
374374
"nbconvert_exporter": "python",
375375
"pygments_lexer": "ipython3",
376-
"version": "3.6.8"
376+
"version": "3.7.7"
377377
}
378378
},
379379
"nbformat": 4,

notebooks/adversarial_patch/attack_adversarial_patch_TensorFlowV2.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"from tensorflow.keras.preprocessing import image\n",
2929
"\n",
3030
"from art.estimators.classification import TensorFlowV2Classifier, EnsembleClassifier\n",
31-
"from art.attacks import AdversarialPatch"
31+
"from art.attacks.evasion import AdversarialPatch"
3232
]
3333
},
3434
{
@@ -344,9 +344,9 @@
344344
],
345345
"metadata": {
346346
"kernelspec": {
347-
"display_name": "venv36_TF210_keras231",
347+
"display_name": "Python 3",
348348
"language": "python",
349-
"name": "venv36_tf210_keras231"
349+
"name": "python3"
350350
},
351351
"language_info": {
352352
"codemirror_mode": {
@@ -358,7 +358,7 @@
358358
"name": "python",
359359
"nbconvert_exporter": "python",
360360
"pygments_lexer": "ipython3",
361-
"version": "3.6.8"
361+
"version": "3.7.7"
362362
}
363363
},
364364
"nbformat": 4,

notebooks/adversarial_retraining.ipynb

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"\n",
3737
"from art.config import ART_DATA_PATH\n",
3838
"from art.estimators.classification import KerasClassifier\n",
39-
"from art.attacks import ProjectedGradientDescent\n",
39+
"from art.attacks.evasion import ProjectedGradientDescent\n",
4040
"from art.utils import get_file"
4141
]
4242
},
@@ -63,7 +63,16 @@
6363
"cell_type": "code",
6464
"execution_count": 2,
6565
"metadata": {},
66-
"outputs": [],
66+
"outputs": [
67+
{
68+
"name": "stdout",
69+
"output_type": "stream",
70+
"text": [
71+
"Downloading data from https://s3.amazonaws.com/img-datasets/mnist.npz\n",
72+
"11493376/11490434 [==============================] - 0s 0us/step\n"
73+
]
74+
}
75+
],
6776
"source": [
6877
"(X_train, y_train), (X_test, y_test) = mnist.load_data()\n",
6978
"X_train = X_train.reshape(X_train.shape[0], 28, 28, 1).astype('float32') / 255\n",
@@ -151,7 +160,7 @@
151160
"name": "stdout",
152161
"output_type": "stream",
153162
"text": [
154-
"Accuracy on first 10 adversarial test samples: 1.000000\n"
163+
"Accuracy on first 10 adversarial test samples: 0.900000\n"
155164
]
156165
}
157166
],
@@ -274,7 +283,7 @@
274283
"name": "stdout",
275284
"output_type": "stream",
276285
"text": [
277-
"Accuracy on first 100 adversarial test samples: 0.450000\n"
286+
"Accuracy on first 100 adversarial test samples: 0.470000\n"
278287
]
279288
}
280289
],
@@ -296,9 +305,9 @@
296305
],
297306
"metadata": {
298307
"kernelspec": {
299-
"display_name": "venv36",
308+
"display_name": "Python 3",
300309
"language": "python",
301-
"name": "venv36"
310+
"name": "python3"
302311
},
303312
"language_info": {
304313
"codemirror_mode": {
@@ -310,7 +319,7 @@
310319
"name": "python",
311320
"nbconvert_exporter": "python",
312321
"pygments_lexer": "ipython3",
313-
"version": "3.6.8"
322+
"version": "3.7.7"
314323
}
315324
},
316325
"nbformat": 4,

notebooks/adversarial_training_mnist.ipynb

Lines changed: 11 additions & 9 deletions
Large diffs are not rendered by default.

notebooks/art-for-tensorflow-v2-callable.ipynb

Lines changed: 38 additions & 70 deletions
Large diffs are not rendered by default.

notebooks/art-for-tensorflow-v2-keras.ipynb

Lines changed: 24 additions & 18 deletions
Large diffs are not rendered by default.

notebooks/attack_decision_based_boundary.ipynb

Lines changed: 511 additions & 114 deletions
Large diffs are not rendered by default.

notebooks/attack_decision_tree.ipynb

Lines changed: 54 additions & 12 deletions
Large diffs are not rendered by default.

notebooks/attack_defence_imagenet.ipynb

Lines changed: 1362 additions & 251 deletions
Large diffs are not rendered by default.

notebooks/attack_hopskipjump.ipynb

Lines changed: 390 additions & 115 deletions
Large diffs are not rendered by default.

notebooks/classifier_blackbox.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"\n",
3131
"from art.config import ART_DATA_PATH\n",
3232
"from art.estimators.classification import BlackBoxClassifier\n",
33-
"from art.attacks import HopSkipJump\n",
33+
"from art.attacks.evasion import HopSkipJump\n",
3434
"from art.utils import to_categorical\n",
3535
"from art.utils import load_dataset, get_file, compute_accuracy"
3636
]
@@ -248,7 +248,7 @@
248248
"name": "python",
249249
"nbconvert_exporter": "python",
250250
"pygments_lexer": "ipython3",
251-
"version": "3.6.1"
251+
"version": "3.7.7"
252252
}
253253
},
254254
"nbformat": 4,

notebooks/classifier_blackbox_tesseract.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
"\n",
2727
"from art.config import ART_DATA_PATH\n",
2828
"from art.estimators.classification import BlackBoxClassifier\n",
29-
"from art.defences import JpegCompression\n",
30-
"from art.attacks import HopSkipJump\n",
31-
"from art.attacks import ZooAttack\n",
29+
"from art.defences.preprocessor import JpegCompression\n",
30+
"from art.attacks.evasion import HopSkipJump\n",
31+
"from art.attacks.evasion import ZooAttack\n",
3232
"from art.utils import to_categorical\n",
3333
"from art.utils import load_dataset, get_file, compute_accuracy"
3434
]
@@ -562,7 +562,7 @@
562562
"name": "python",
563563
"nbconvert_exporter": "python",
564564
"pygments_lexer": "ipython3",
565-
"version": "3.6.10"
565+
"version": "3.7.7"
566566
}
567567
},
568568
"nbformat": 4,

notebooks/classifier_catboost.ipynb

Lines changed: 48 additions & 18 deletions
Large diffs are not rendered by default.

notebooks/classifier_gpy_gaussian_process.ipynb

Lines changed: 36 additions & 21 deletions
Large diffs are not rendered by default.

notebooks/classifier_lightgbm.ipynb

Lines changed: 43 additions & 13 deletions
Large diffs are not rendered by default.

notebooks/classifier_scikitlearn_AdaBoostClassifier.ipynb

Lines changed: 44 additions & 14 deletions
Large diffs are not rendered by default.

notebooks/classifier_scikitlearn_BaggingClassifier.ipynb

Lines changed: 48 additions & 18 deletions
Large diffs are not rendered by default.

notebooks/classifier_scikitlearn_DecisionTreeClassifier.ipynb

Lines changed: 50 additions & 20 deletions
Large diffs are not rendered by default.

notebooks/classifier_scikitlearn_ExtraTreesClassifier.ipynb

Lines changed: 53 additions & 21 deletions
Large diffs are not rendered by default.

notebooks/classifier_scikitlearn_GradientBoostingClassifier.ipynb

Lines changed: 54 additions & 23 deletions
Large diffs are not rendered by default.

notebooks/classifier_scikitlearn_LogisticRegression.ipynb

Lines changed: 21 additions & 14 deletions
Large diffs are not rendered by default.

notebooks/classifier_scikitlearn_RandomForestClassifier.ipynb

Lines changed: 72 additions & 59 deletions
Large diffs are not rendered by default.

notebooks/classifier_scikitlearn_SVC_LinearSVC.ipynb

Lines changed: 183 additions & 250 deletions
Large diffs are not rendered by default.

notebooks/classifier_scikitlearn_pipeline_pca_cv_svc.ipynb

Lines changed: 18 additions & 10 deletions
Large diffs are not rendered by default.

notebooks/classifier_xgboost.ipynb

Lines changed: 98 additions & 44 deletions
Large diffs are not rendered by default.

notebooks/detection_adversarial_samples_cifar10.ipynb

Lines changed: 43 additions & 405 deletions
Large diffs are not rendered by default.

notebooks/fabric_for_deep_learning_adversarial_samples_fashion_mnist.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,7 @@
14321432
"name": "python",
14331433
"nbconvert_exporter": "python",
14341434
"pygments_lexer": "ipython3",
1435-
"version": "3.4.10"
1435+
"version": "3.7.7"
14361436
}
14371437
},
14381438
"nbformat": 4,

notebooks/model_inversion_attacks_mnist.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"from numpy.random import seed\n",
3434
"seed(123)\n",
3535
"\n",
36-
"from art.classifiers import KerasClassifier\n",
37-
"from art.attacks import MIFace\n",
36+
"from art.estimators.classification import KerasClassifier\n",
37+
"from art.attacks.inference import MIFace\n",
3838
"from art.utils import load_dataset\n",
3939
"\n",
4040
"%matplotlib inline\n",
@@ -535,7 +535,7 @@
535535
"name": "python",
536536
"nbconvert_exporter": "python",
537537
"pygments_lexer": "ipython3",
538-
"version": "3.7.5"
538+
"version": "3.7.7"
539539
}
540540
},
541541
"nbformat": 4,

notebooks/output_randomized_smoothing_mnist.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,9 @@
400400
"version": "0.3.2"
401401
},
402402
"kernelspec": {
403-
"display_name": "venv36_TF210_keras231",
403+
"display_name": "Python 3",
404404
"language": "python",
405-
"name": "venv36_tf210_keras231"
405+
"name": "python3"
406406
},
407407
"language_info": {
408408
"codemirror_mode": {
@@ -414,7 +414,7 @@
414414
"name": "python",
415415
"nbconvert_exporter": "python",
416416
"pygments_lexer": "ipython3",
417-
"version": "3.6.8"
417+
"version": "3.7.7"
418418
}
419419
},
420420
"nbformat": 4,

notebooks/poisoning_attack_feature_collision.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"\n",
4343
"from art.config import ART_DATA_PATH\n",
4444
"from art.utils import load_dataset, get_file\n",
45-
"from art.classifiers import KerasClassifier\n",
45+
"from art.estimators.classification import KerasClassifier\n",
4646
"from art.attacks.poisoning import FeatureCollisionAttack\n",
4747
"\n",
4848
"import numpy as np\n",
@@ -400,7 +400,7 @@
400400
"name": "python",
401401
"nbconvert_exporter": "python",
402402
"pygments_lexer": "ipython3",
403-
"version": "3.6.10"
403+
"version": "3.7.7"
404404
}
405405
},
406406
"nbformat": 4,

notebooks/poisoning_attack_svm.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@
321321
"name": "python",
322322
"nbconvert_exporter": "python",
323323
"pygments_lexer": "ipython3",
324-
"version": "3.6.10"
324+
"version": "3.7.7"
325325
}
326326
},
327327
"nbformat": 4,

notebooks/poisoning_dataset_mnist.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@
521521
"name": "python",
522522
"nbconvert_exporter": "python",
523523
"pygments_lexer": "ipython3",
524-
"version": "3.6.10"
524+
"version": "3.7.7"
525525
}
526526
},
527527
"nbformat": 4,

notebooks/provenance_defence.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@
458458
"name": "python",
459459
"nbconvert_exporter": "python",
460460
"pygments_lexer": "ipython3",
461-
"version": "3.4.10"
461+
"version": "3.7.7"
462462
}
463463
},
464464
"nbformat": 4,

notebooks/robustness_verification_clique_method_tree_ensembles_gradient_boosted_decision_trees_classifiers.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@
258258
],
259259
"metadata": {
260260
"kernelspec": {
261-
"display_name": "venv36",
261+
"display_name": "Python 3",
262262
"language": "python",
263-
"name": "venv36"
263+
"name": "python3"
264264
},
265265
"language_info": {
266266
"codemirror_mode": {
@@ -272,7 +272,7 @@
272272
"name": "python",
273273
"nbconvert_exporter": "python",
274274
"pygments_lexer": "ipython3",
275-
"version": "3.6.8"
275+
"version": "3.7.7"
276276
}
277277
},
278278
"nbformat": 4,

0 commit comments

Comments
 (0)