Skip to content

Commit 6985952

Browse files
Refactor autoencoders for TF1.0
Signed-off-by: Norman Heckscher <norman.heckscher@gmail.com>
1 parent 3133823 commit 6985952

File tree

2 files changed

+37
-58
lines changed

2 files changed

+37
-58
lines changed

examples/3_NeuralNetworks/autoencoder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# Import MNIST data
1919
from tensorflow.examples.tutorials.mnist import input_data
20-
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
20+
mnist = input_data.read_data_sets("MNIST_data", one_hot=True)
2121

2222
# Parameters
2323
learning_rate = 0.01
@@ -83,7 +83,7 @@ def decoder(x):
8383
optimizer = tf.train.RMSPropOptimizer(learning_rate).minimize(cost)
8484

8585
# Initializing the variables
86-
init = tf.initialize_all_variables()
86+
init = tf.global_variables_initializer()
8787

8888
# Launch the graph
8989
with tf.Session() as sess:

notebooks/3_NeuralNetworks/autoencoder.ipynb

Lines changed: 35 additions & 56 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)