"""
Created on Sat Mar 24 16:35:11 2018
@author: luogan
"""
'''
from tensorflow.examples.tutorials.mnist import input_data
mnist=input_data.read_data_sets('MNIST_data/',one_hot=True)
'''
print(mnist.train.images.shape)
print(mnist.train.labels.shape)
print(mnist.test.images.shape)
print(mnist.test.images.shape)
a=mnist.train.images[8]
import pandas as pd
b=pd.DataFrame(a.reshape(28,28))
b.to_excel('c.xls')
d=mnist.train.labels[8]
print(mnist.validation.images.shape)
print(mnist.validation.labels.shape)
import tensorflow as tf
batch=mnist.train.next_batch(50)
c=batch[0]
c=tf.reshape(c,[-1,28,28,1])
sess = tf.Session()
A = tf.Variable(tf.truncated_normal([1,784],0,1,dtype=tf.float32,seed=3))
d=tf.reshape(A,[-1,28,28,1])
sess.run(A.initializer)
print(sess.run(d))
print(d.get_shape())