import tensorflow as tf

    #print(image.shape)
    #print(label.shape)
    images,labels=tf.train.shuffle_batch([image,label],
        batch_size=batch_size,num_threads=10,capacity=10000,min_after_dequeue=200)
    return tf.reshape(images,[batch_size,4096]),tf.reshape(labels,[batch_size])

def get_test_batch(image,label,batch_size):
    images,labels=tf.train.batch([image,label],batch_size=batch_size)
    return tf.reshape(images,[batch_size,4096]),tf.reshape(labels,[batch_size])

def get_valid_batch(image,label,batch_size):
    images,labels=tf.train.batch([image,label],batch_size=batch_size)
    return tf.reshape(images,[batch_size,4096]),tf.reshape(labels,[batch_size])
    
class trainwork(object):
    def __init__(self):
        with tf.variable_scope('scop'):
            self.w1=tf.get_variable('w1', [4096,1024],initializer=tf.contrib.layers.xavier_initializer_conv2d())
            self.w2=tf.get_variable('w2', [1024,classnum],initializer=tf.contrib.layers.xavier_initializer_conv2d())
            self.b1 = tf.get_variable('b1', [1024],initializer=tf.constant_initializer(0.0))
            self.b2 = tf.get_variable('b2', [classnum],initializer=tf.constant_initializer(0.0))

    def inference(self,images):
        images=tf.cast(images,tf.float32)/255.0
