Skip to content

Commit

Permalink
Merge pull request #47 from openai/tfseed
Browse files Browse the repository at this point in the history
added TF seed to both tutorials for reproducibility
  • Loading branch information
npapernot authored Nov 22, 2016
2 parents b1169ac + 717e672 commit 5c6ece8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tutorials/mnist_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def main(argv=None):
MNIST cleverhans tutorial
:return:
"""

# Set TF random seed to improve reproducibility
tf.set_random_seed(1234)

# Image dimensions ordering should follow the Theano convention
if keras.backend.image_dim_ordering() != 'th':
keras.backend.set_image_dim_ordering('th')
Expand Down
3 changes: 3 additions & 0 deletions tutorials/mnist_tutorial_jsma.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def main(argv=None):
:return:
"""

# Set TF random seed to improve reproducibility
tf.set_random_seed(1234)

###########################################################################
# Define the dataset and model
###########################################################################
Expand Down

0 comments on commit 5c6ece8

Please sign in to comment.