Answers for "how to create mini batches in tensorflow"

0

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)
Posted by: Guest on June-16-2020

Python Answers by Framework

Browse Popular Code Answers by Language