Skip to content

Commit 4183645

Browse files
committed
Remove TensorFlow2v1
Signed-off-by: Beat Buesser <[email protected]>
1 parent 32b36ba commit 4183645

8 files changed

+6
-187
lines changed

docs/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
#
5959
# This is also used if you do content translation via gettext catalogs.
6060
# Usually you set "language" from the command line for these cases.
61-
language = None
61+
language = "English"
6262

6363
# List of patterns, relative to source directory, that match files and
6464
# directories to ignore when looking for source files.
@@ -81,8 +81,6 @@
8181
import sphinx_rtd_theme
8282
except ImportError:
8383
pass # assume we have sphinx >= 1.3
84-
else:
85-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
8684
html_theme = "sphinx_rtd_theme"
8785

8886
# Theme options are theme-specific and customize the look and feel of a theme

examples/README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ for accuracy.
88

99

1010
### TensorFlow
11-
[get_started_tensorflow.py](get_started_tensorflow.py) demonstrates a simple example of using ART with TensorFlow v1.x.
11+
[get_started_tensorflow_v2.py](get_started_tensorflow_v2.py) demonstrates a simple example of using ART with TensorFlow v2.x.
1212

1313
### Keras
1414
[get_started_keras.py](get_started_keras.py) demonstrates a simple example of using ART with Keras.
@@ -49,8 +49,3 @@ on it.
4949

5050
[mnist_poison_detection.py](mnist_poison_detection.py) generates a backdoor for MNIST dataset, then trains a
5151
convolutional neural network on the poisoned dataset and runs activation defence to find poison.
52-
53-
[mnist_transferability.py](mnist_transferability.py) trains a convolutional neural network on the MNIST dataset using
54-
the Keras backend, then generates adversarial images using DeepFool and uses them to attack a convolutional neural
55-
network trained on MNIST using TensorFlow. This is to show how to perform a black-box attack: the attack never has
56-
access to the parameters of the TensorFlow model.

examples/adversarial_training_cifar10.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88

99
import logging
1010

11-
import tensorflow as tf
12-
13-
tf.compat.v1.disable_eager_execution()
14-
1511
from keras.models import Sequential
1612
from keras.layers import Dense, Flatten, Conv2D, MaxPooling2D, Activation, Dropout
1713
import numpy as np

examples/adversarial_training_data_augmentation.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
This is an example of how to use ART and Keras to perform adversarial training using data generators for CIFAR10
33
"""
44

5-
import tensorflow as tf
6-
7-
tf.compat.v1.disable_eager_execution()
8-
95
import keras
106
import numpy as np
117
from keras.layers import Conv2D, Dense, Flatten, MaxPooling2D, Input, BatchNormalization

examples/get_started_keras.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55
The parameters are chosen for reduced computational requirements of the script and not optimised for accuracy.
66
"""
77

8-
import tensorflow as tf
9-
10-
tf.compat.v1.disable_eager_execution()
11-
from tensorflow.keras.models import Sequential
12-
from tensorflow.keras.layers import Dense, Flatten, Conv2D, MaxPooling2D
13-
from tensorflow.keras.losses import categorical_crossentropy
14-
from tensorflow.keras.optimizers.legacy import Adam
8+
from keras.models import Sequential
9+
from keras.layers import Dense, Flatten, Conv2D, MaxPooling2D
10+
from keras.losses import categorical_crossentropy
11+
from keras.optimizers import Adam
1512
import numpy as np
1613

1714
from art.attacks.evasion import FastGradientMethod

examples/get_started_tensorflow.py

Lines changed: 0 additions & 72 deletions
This file was deleted.

examples/mnist_poison_detection.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77

88
import pprint
99
import json
10-
import tensorflow as tf
1110

12-
tf.compat.v1.disable_eager_execution()
1311
from keras.models import Sequential
1412
from keras.layers import Dense, Flatten, Conv2D, MaxPooling2D, Dropout
1513
import numpy as np

examples/mnist_transferability.py

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)