Last active
January 13, 2018 19:00
-
-
Save JoshVarty/7a291654f88b79eb2fc4a1a1b3e2bbd1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with tf.Session(graph=graph) as session: | |
tf.global_variables_initializer().run() | |
num_steps = 1000 | |
batch_size = 100 | |
for step in range(num_steps): | |
offset = (step * batch_size) % (train_labels.shape[0] - batch_size) | |
batch_images = train_images[offset:(offset + batch_size), :] | |
batch_labels = train_labels[offset:(offset + batch_size), :] | |
feed_dict = {input: batch_images, labels: batch_labels} | |
o, c, = session.run([optimizer, cost], feed_dict=feed_dict) | |
print("Cost: ", c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment