Created
April 23, 2018 00:07
-
-
Save russellizadi/979e09024e8e1bce9fea2b5b8aaee53e to your computer and use it in GitHub Desktop.
mnist
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
import tensorflow as tf | |
import matplotlib.pyplot as plt | |
from datasets import mnist | |
dataset = mnist.train() | |
iterator = dataset.make_one_shot_iterator() | |
next_image, next_label = iterator.get_next() | |
with tf.Session() as sess: | |
next_image, next_label = sess.run([next_image, next_label]) | |
next_image = np.reshape(next_image, [28, 28]) | |
print(next_label) | |
plt.imshow(next_image) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment