Tanvir
Tanvir

Reputation: 885

Input images in tensorflow graph as a couple

I want to input the images in my siamese model as a couple. But if I read them from a list of image names, using

file_name_q = tf.train.string_input_producer(string_tensor=name, shuffle=False, )

the images are read read sequentially and their integrity as a couple is destroyed. Here, name is the list of all the images names, such that index 0 and 1 is a pair, 2 and 3 is a pair and so on.

Any insights?

Upvotes: 0

Views: 147

Answers (1)

saeta
saeta

Reputation: 639

Consider using tf.train.batch_join, as that maintains grouping between two tensors. See the documentation at: https://www.tensorflow.org/api_docs/python/io_ops/input_pipeline

Upvotes: 2

Related Questions