Until recently, all my code in TF used tf.placeholder to represent the input. It is very convenient, because it allows me to feed a batch of arbitrary length to my network, allowing to use the same code in different places (training, testing, prediction...)
After finding out that feed_dict are so slow, I wanted to change and started using pipelines, which basically use tf.Variables instead of placeholders: each variable is a fixed length tensor, and represents a batch that is used as input of the network.
My problem is that, while placeholders were "untied" and you had to feed data to it, pipelines are bound to input data. So, for example, once I setup my pipeline to use the training data in batches of size 10, I cannot use data from the testing set in batches of, say, 12 examples.
Or can I?
What is the proper way of working without placeholders?