def distorted_inputs(data_dir, batch_size):
    """[...]"""
filenames = ['/tmp/images.bin']
for f in filenames:
    if not gfile.Exists(f):
        raise ValueError('Failed to find file: ' + f)
filename_queue = tf.train.string_input_producer(filenames)
read_input = read_my_data(filename_queue)
reshaped_image = tf.cast(read_input.uint8image, tf.float32)
Attach a queue to a numpy array in tensorflow for data fetch instead of files?