Skip to content

Instantly share code, notes, and snippets.

@avloss
Created March 10, 2017 17:31
Show Gist options
  • Save avloss/a8d27461ca94c936881807d1cb9ef195 to your computer and use it in GitHub Desktop.
Save avloss/a8d27461ca94c936881807d1cb9ef195 to your computer and use it in GitHub Desktop.
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('MNIST_data', one_hot=True)

sess = tf.InteractiveSession()
sess.run(tf.global_variables_initializer())

for _ in range(1000):
    batch = mnist.train.next_batch(100)
    train_step.run(feed_dict={x: batch[0], y_: batch[1]})
Extracting MNIST_data/train-images-idx3-ubyte.gz
Extracting MNIST_data/train-labels-idx1-ubyte.gz
Extracting MNIST_data/t10k-images-idx3-ubyte.gz
Extracting MNIST_data/t10k-labels-idx1-ubyte.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment