Skip to content

Commit

Permalink
Refactor autoencoders for TF1.0
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Heckscher <[email protected]>
  • Loading branch information
normanheckscher committed Jan 14, 2017
1 parent 3133823 commit 6985952
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 58 deletions.
4 changes: 2 additions & 2 deletions examples/3_NeuralNetworks/autoencoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# Import MNIST data
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
mnist = input_data.read_data_sets("MNIST_data", one_hot=True)

# Parameters
learning_rate = 0.01
Expand Down Expand Up @@ -83,7 +83,7 @@ def decoder(x):
optimizer = tf.train.RMSPropOptimizer(learning_rate).minimize(cost)

# Initializing the variables
init = tf.initialize_all_variables()
init = tf.global_variables_initializer()

# Launch the graph
with tf.Session() as sess:
Expand Down
91 changes: 35 additions & 56 deletions notebooks/3_NeuralNetworks/autoencoder.ipynb

Large diffs are not rendered by default.

1 comment on commit 6985952

@tgsmith61591
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So using your example, how would I extract the optimized weights after training?

Please sign in to comment.