src/audio2vec_train.py
def batch_pipeline(filenames, batch_size, feat_dim, seq_len, \
    num_epochs=None):
    """ 
    Building Input data graph
    examples: list of 2-D tensors in batch
    labels: list of 2-D tensors in batch
    """
    filename_queue = tf.train.string_input_producer(filenames, shuffle=True)
    # results = tf.unstack(dataQ_feeding(filename_queue, feat_dim, seq_len))
    # result = dataQ_feeding(filename_queue, feat_dim, seq_len)
    result = TFRQ_feeding(filename_queue, feat_dim, seq_len)

    # min_after_dequeue defines how big a buffer we will randomly sample
    #  from -- bigger means better shuffling but slower start up and
    # more memory used
    # capacity must be larger than min_after_dequeue and the amount larger
    # determines the maximum we will prefetch. Recommendation:
    # min_after_dequeue + (num_threads + a small safety margin) * batch_size
    min_after_dequeue = 5000
    capacity = min_after_dequeue + 8 * batch_size
    example_batch, label_batch = tf.train.shuffle_batch(
        result, batch_size=batch_size,num_threads=6,
                capacity=capacity,\
        min_after_dequeue=min_after_dequeue)
    example_batch = tf.transpose (example_batch, perm=[1,0,2])
    
    
    ### do batch normalization ###
    
    
    ### done batch normalization ###

    unstacked_examples = tf.unstack(example_batch, seq_len)
    ### labels do not need to be unstacked ###
    ### unstacked_labels   = tf.unstack(label_batch, seq_len) ###
    return unstacked_examples, label_batch
 
    Building Input data graph
    examples: list of 2-D tensors in batch
    labels: list of 2-D tensors in batch
    
Building Input data graph
examples: list of 2-D tensors in batch
labels: list of 2-D tensors in batch
Building Input data graph examples : list of 2 - D tensors in batch labels : list of 2 - D tensors in batch
def batch_pipeline(filenames, batch_size, feat_dim, seq_len, \
    num_epochs=None):
    filename_queue = tf.train.string_input_producer(filenames, shuffle=True)
    result = TFRQ_feeding(filename_queue, feat_dim, seq_len)
    min_after_dequeue = 5000
    capacity = min_after_dequeue + 8 * batch_size
    example_batch, label_batch = tf.train.shuffle_batch(
        result, batch_size=batch_size,num_threads=6,
                capacity=capacity,\
        min_after_dequeue=min_after_dequeue)
    example_batch = tf.transpose (example_batch, perm=[1,0,2])
    unstacked_examples = tf.unstack(example_batch, seq_len)
    return unstacked_examples, label_batch
def batch_pipeline ( filenames , batch_size , feat_dim , seq_len , num_epochs = None ) : filename_queue = tf . train . string_input_producer ( filenames , shuffle = True ) result = TFRQ_feeding ( filename_queue , feat_dim , seq_len ) min_after_dequeue = 5000 capacity = min_after_dequeue + 8 * batch_size example_batch , label_batch = tf . train . shuffle_batch ( result , batch_size = batch_size , num_threads = 6 , capacity = capacity , min_after_dequeue = min_after_dequeue ) example_batch = tf . transpose ( example_batch , perm = [ 1 , 0 , 2 ] ) unstacked_examples = tf . unstack ( example_batch , seq_len ) return unstacked_examples , label_batch
Building Input data graph
examples: list of 2-D tensors in batch
labels: list of 2-D tensors in batch
Building Input data graph examples : list of 2 - D tensors in batch labels : list of 2 - D tensors in batch
""" 
    Building Input data graph
    examples: list of 2-D tensors in batch
    labels: list of 2-D tensors in batch
    """ # results = tf.unstack(dataQ_feeding(filename_queue, feat_dim, seq_len)) # result = dataQ_feeding(filename_queue, feat_dim, seq_len) # min_after_dequeue defines how big a buffer we will randomly sample #  from -- bigger means better shuffling but slower start up and # more memory used # capacity must be larger than min_after_dequeue and the amount larger # determines the maximum we will prefetch. Recommendation: # min_after_dequeue + (num_threads + a small safety margin) * batch_size ### do batch normalization ### ### done batch normalization ### ### labels do not need to be unstacked ### ### unstacked_labels   = tf.unstack(label_batch, seq_len) ###
filenames
batch_size
feat_dim
seq_len
num_epochs