I have data that comes into my graph through queue runners, after I switched from the handy but speed-inferior placeholders.
After each training epoch, I wish to run a validation pass. Other than the the training pass, the validation pass uses different data, no augmentation and no shuffling.
The question is simple: how do I toggle these things?
A few observations:
- I cannot toggle the
shuffleoption in thestring_input_producerthrough atf.placeholderboolean. - The only examples on-the-line that I have found use the
placeholderto seperate the training from the validation data. These in turn, do not use the superior queue runners. - I did manage to do the above with a
tf.cond()here i would test for ais_trainingtf.placeholderboolean that i pass through thefeed_dict. Is this solution the most optimal? How expensive is thistf.conf()method?
tf.condis not the solution. It pulls things through both queues, on each evaluation of either side. - mdaousttf.condcan still be used but with a hack. An alternative isQueueBase.from_list. See: github.com/tensorflow/tensorflow/issues/2514 - sigh.. - TimZaman