shaaa
shaaa

Reputation: 513

Tensorflow: batching to preserve order

I have two sets of image data with different resolutions, one set is actually the training data and other set is label data. I am using a CNN implemented in tensorflow.

I want to extract batches of data for training like this.

image_batch, label_batch = tf.train.batch([images, labels], batch_size=32, capacity=1096)

Right now my code is not working as it should. Does the above code preserve the order of the images and labels when generating batches? (I want to preserve the order to match the data and labels)

Upvotes: 0

Views: 355

Answers (1)

Alexandre Passos
Alexandre Passos

Reputation: 5206

The code does preserve the matching between the labels and the images. It might produce batches out of order, but that's all.

Upvotes: 1

Related Questions