In [2]:
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist=input_data.read_data_sets('MNIST_data',one_hot=True)
In [23]:
batch=mnist.train.next_batch(3)
xs=batch[0]
ys=batch[1]
In [24]:
xs
Out[24]:
In [25]:
ys
Out[25]:
In [26]:
import numpy as np
x=np.reshape(xs[0],newshape=(28,28))
In [27]:
%matplotlib inline
from matplotlib import pyplot as plt
plt.imshow(x,'gray')
Out[27]:
In [ ]: