Tensorflow: parallelize tensor that runs a dequeue

Viewed 53

I'm using Tensorflow to run some processing code over images. I have

  • a FIFOQueue called some_queue
  • a tensor called t that is built by some_op(some_other_op(some_queue.dequeue())), so that each run dequeues one element from some_queue and performs operations on it.

All the elements in the queue can be processed in parallel, so I'd like to run t several times but in parallel (ie not call session.run(t) in a loop).

I've tried things like session.run([t] * size_of_queue) and session.run(tf.tuple(*([t] * size_of_queue)) but neither work properly. What's the proper way to do this?

Thanks!

0 Answers
Related