I'm trying to create a multilayer NN for tensorflow, but I've looked it up a lot, but I don't know the command to generate a mini-batch from the original data.For example
Could you tell me the command to randomly generate 100 mini-batch from data X (1000 rows, 10 columns) teacher data Y (1000 rows, 1 column)?
It can be achieved by the shuffle_batch() function.
https://www.tensorflow.org/api_docs/python/tf/train/shuffle_batch
Instructions for use are described below.
https://www.tensorflow.org/programmers_guide/reading_data
example_batch, label_batch=tf.train.shuffle_batch(
[example, label], batch_size=batch_size, capacity=capacity,
min_after_dequeue = min_after_dequeue)
© 2024 OneMinuteCode. All rights reserved.