mini batch training tensorflow code example
Example: how to create mini batches in tensorflow
# shuffle_batch will shuffle the data in each minibatch
tf.train.shuffle_batch([data, labels], batch_size=batch_size,
capacity=capacity,
num_threads=threads,
allow_smaller_final_batch=True)
'''
batch() will pull minibatches in the order it reads from the
tensors
'''
tf.train.batch([data, labels], batch_size=batch_size,
capacity=capacity,
num_threads=threads,
allow_smaller_final_batch=True)