I cannot understand why it doesn't work,and  why it have a bug,please help me.

def get_data_set_with_csv(file_name, header_lines, batch_size, repeat_size):
    dataset = tf.data.TextLineDataset(file_name).skip(header_lines)
        def parse_csv(line):
            col_types = [tf.ones(shape=(1,),dtype=tf.float32)]+[tf.zeros(shape=(1,),dtype=tf.float32)]*784
            data= tf.decode_csv(tf.expand_dims(line,axis=0),col_types)
            label = data[0]
            img = data[1:]
            return label, img
    dataset  = dataset.map(parse_csv)
    return dataset
and i use it with 
User contributions licensed under CC BY-SA 3.0