Here is described a simple process which I use for training. I want to change input pipeline. Now I create .tfrecords file, and do TFRecordReader -> tf.train.batch -> tf.parse_example
. If in the body of the loop I do only the last stage, the example will be dequeued only once (when the loop is created). If I add tf.train.batch
in the body, it creates a dequeue operation inside the loop, but an enqueue as well (but I'm not sure...)
So, the question is - How can I use tf.train.batch
to enqueue example in while_loop (and parse)?
I parse examples after dequeue because I have sparse data.