I have a python function that automatically generates a (data, label) pair when I call it. I do not know how to attach this function to TIFF, so the queue is filled with data received from my function. The code I have so far is:
myq = tf.FIFOQueue(5000, [tf.float32, tf.float32], [[4],[1]])
enqueue_op = myq.enqueue(read_data())
qr = tf.train.QueueRunner(myq, [enqueue_op]*2)
...
threads = qr.create_threads(sess=sess,coord=coord, start=True)
However, this only calls the read_data () function and continues to push the same value into the queue. How to properly connect my function to the enqueue method so that I can fill the queue with data from my function (preferably using multiple threads in the background). Thank you for your help.
source
share