Skip to content

Commit

Permalink
Merge pull request #236 from tensorflow/cleverhans_tutorials
Browse files Browse the repository at this point in the history
rename "tutorials" to "cleverhans_tutorials"
  • Loading branch information
npapernot authored Aug 22, 2017
2 parents 6dfd0f9 + ee99cba commit 6a1692e
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,20 @@ currently [test it](https://travis-ci.org/tensorflow/cleverhans) with Python
## Tutorials

To help you get started with the functionalities provided by this library, the
`tutorials/' folder comes with the following tutorials:
* **MNIST with FGSM** ([code](tutorials/mnist_tutorial_tf.py)): this
`cleverhans_tutorials/' folder comes with the following tutorials:
* **MNIST with FGSM** ([code](cleverhans_tutorials/mnist_tutorial_tf.py)): this
tutorial covers how to train a MNIST model using TensorFlow,
craft adversarial examples using the [fast gradient sign method](https://arxiv.org/abs/1412.6572),
and make the model more robust to adversarial examples using adversarial training.
* **MNIST with FGSM using Keras** ([code](tutorials/mnist_tutorial_keras_tf.py)): this
* **MNIST with FGSM using Keras** ([code](cleverhans_tutorials/mnist_tutorial_keras_tf.py)): this
tutorial covers how to define a MNIST model with Keras and train it using TensorFlow,
craft adversarial examples using the [fast gradient sign method](https://arxiv.org/abs/1412.6572),
and make the model more robust to adversarial
examples using adversarial training.
* **MNIST with JSMA** ([code](tutorials/mnist_tutorial_jsma.py)): this second
* **MNIST with JSMA** ([code](cleverhans_tutorials/mnist_tutorial_jsma.py)): this second
tutorial covers how to define a MNIST model with Keras and train it using TensorFlow and
craft adversarial examples using the [Jacobian-based saliency map approach](https://arxiv.org/abs/1511.07528).
* **MNIST using a black-box attack** ([code](tutorials/mnist_blackbox.py)):
* **MNIST using a black-box attack** ([code](cleverhans_tutorials/mnist_blackbox.py)):
this tutorial implements the black-box
attack described in this [paper](https://arxiv.org/abs/1602.02697).
The adversary train a substitute model: a copy that imitates the black-box
Expand Down
2 changes: 1 addition & 1 deletion cleverhans/attacks_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def jacobian_augmentation(sess, x, X_sub_prev, Y_sub, grads, lmbda,
Augment an adversary's substitute training set using the Jacobian
of a substitute model to generate new synthetic inputs.
See https://arxiv.org/abs/1602.02697 for more details.
See tutorials/mnist_blackbox.py for example use case
See cleverhans_tutorials/mnist_blackbox.py for example use case
:param sess: TF session in which the substitute model is defined
:param x: input TF placeholder for the substitute model
:param X_sub_prev: substitute training data available to the adversary
Expand Down
2 changes: 1 addition & 1 deletion cleverhans/devtools/list_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def list_files(suffix=""):
file_list = _list_files(cleverhans_path, suffix)

repo_path = os.path.abspath(os.path.join(cleverhans_path, os.pardir))
tutorials_path = os.path.join(repo_path, "tutorials")
tutorials_path = os.path.join(repo_path, "cleverhans_tutorials")
tutorials_files = _list_files(tutorials_path, suffix)
tutorials_files = [os.path.join(os.pardir, path) for path in
tutorials_files]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
from cleverhans.attacks import FastGradientMethod
from cleverhans.attacks_tf import jacobian_graph, jacobian_augmentation

from tutorials.tutorial_models import make_basic_cnn, MLP
from tutorials.tutorial_models import Flatten, Linear, ReLU, Softmax
from cleverhans_tutorials.tutorial_models import make_basic_cnn, MLP
from cleverhans_tutorials.tutorial_models import Flatten, Linear, ReLU, Softmax

FLAGS = flags.FLAGS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from cleverhans.utils import set_log_level
from cleverhans.utils_mnist import data_mnist
from cleverhans.utils_tf import model_train, model_eval, tf_model_load
from tutorials.tutorial_models import make_basic_cnn
from cleverhans_tutorials.tutorial_models import make_basic_cnn

FLAGS = flags.FLAGS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from cleverhans.utils_mnist import data_mnist
from cleverhans.utils_tf import model_train, model_eval, model_argmax
from cleverhans.utils_keras import KerasModelWrapper, cnn_model
from tutorials.tutorial_models import make_basic_cnn
from cleverhans_tutorials.tutorial_models import make_basic_cnn

FLAGS = flags.FLAGS

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from cleverhans.utils_mnist import data_mnist
from cleverhans.utils_tf import model_train, model_eval
from cleverhans.attacks import FastGradientMethod
from tutorials.tutorial_models import make_basic_cnn
from cleverhans_tutorials.tutorial_models import make_basic_cnn
from cleverhans.utils import AccuracyReport, set_log_level

import os
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests_tf/test_mnist_blackbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class TestMNISTBlackboxF(unittest.TestCase):
def test_mnist_blackbox(self):
from tutorials import mnist_blackbox
from cleverhans_tutorials import mnist_blackbox

np.random.seed(42)
import tensorflow as tf
Expand Down
2 changes: 1 addition & 1 deletion tests_tf/test_mnist_tutorial_cw.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class TestMNISTTutorialCW(unittest.TestCase):
def test_mnist_tutorial_cw(self):
from tutorials import mnist_tutorial_cw
from cleverhans_tutorials import mnist_tutorial_cw

# Run the MNIST tutorial on a dataset of reduced size
# and disable visualization.
Expand Down
2 changes: 1 addition & 1 deletion tests_tf/test_mnist_tutorial_jsma.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_mnist_tutorial_jsma(self):
import tensorflow as tf
tf.set_random_seed(42)

from tutorials import mnist_tutorial_jsma
from cleverhans_tutorials import mnist_tutorial_jsma

# Run the MNIST tutorial on a dataset of reduced size
# and disable visualization.
Expand Down
2 changes: 1 addition & 1 deletion tests_tf/test_mnist_tutorial_keras_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_mnist_tutorial_keras_tf(self):
import tensorflow as tf
tf.set_random_seed(42)

from tutorials import mnist_tutorial_keras_tf
from cleverhans_tutorials import mnist_tutorial_keras_tf

# Run the MNIST tutorial on a dataset of reduced size
test_dataset_indices = {'train_start': 0,
Expand Down
2 changes: 1 addition & 1 deletion tests_tf/test_mnist_tutorial_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_mnist_tutorial_tf(self):
import tensorflow as tf
tf.set_random_seed(42)

from tutorials import mnist_tutorial_tf
from cleverhans_tutorials import mnist_tutorial_tf

# Run the MNIST tutorial on a dataset of reduced size
test_dataset_indices = {'train_start': 0,
Expand Down

0 comments on commit 6a1692e

Please sign in to comment.