Now I am using tensorflow to write a program to validate models. I use the FIFOQueue to queue the input data. For example, I have 50,000 images and enqueue 100 images at a t
Try dequeue_up_to
instead of dequeue_many
:
https://www.tensorflow.org/versions/r0.10/api_docs/python/io_ops.html
Hope that helps!
I have faced this issue multiple times and from my experience this is usually caused if the input files cannot be found. my input was a list of pngs from a directory and I was using this to get the input images.
input = tensorflow.train.string_input_producer(tensorflow.train.match_filenames_once("/input/*.png"))
which was somehow not getting the files correctly. Changing it to
filename_im = tensorflow.train.string_input_producer(glob.glob('/input/*.png'))
solved the issue
You could catch the specific error which will gracefully end training once all examples have been exhausted:
try:
while True:
# Run training Ops here...
except tf.errors.OutOfRangeError:
print('Done training -- epoch limit reached')
I believe that this is only a warning that the queue is empty, but does not cause errors. I see similar warnings but my program does not break. Does yours? See this thread.