title: Tensorflow autoencoder code clarification and custom test data
body: <p>I'd like to ask a question about something I don't fully understand regarding Tensorflow input queues. I've created a Tensorflow module which creates data batches as follows, using code from the.</p>
  
  <p>This the code:</p>
  
  <pre><code># various initialization variables
  BATCH_SIZE = 128
  N_FEATURES = 9
  
  def batch_generator(filenames, record_bytes):
    """ filenames is the list of files you want to read from. 
    In this case, it contains only heart.csv
    """
  
    record_bytes = 29**2 # 29x29 images per record
    filename_queue = tf.train.string_input_producer(filenames)
    reader = tf.FixedLengthRecordReader(record_bytes=record_bytes) # skip   the first line in the file
    _, value = reader.read(filename_queue)
    print(value)
  
  
  
    # read in the 10 columns of data
    content = tf.decode_raw(value, out_type=tf.uint8) 
  
    # The bytes read  represent the image, which we reshape
    # from [depth * height * width] to [depth, height, width].
    depth_major = tf.reshape(
      tf.strided_slice(content, [0],
                     [record_bytes]),
      [1, 29, 29])
  
    # Convert from [depth, height, width] to [height, width, depth].
    uint8image = tf.transpose(depth_major, [1, 2, 0])
    uint8image = tf.reshape(uint8image, [29**2])  # reshape it a single- dimensional vector
    uint8image = tf.cast(uint8image, tf.float32)
    uint8image = tf.nn.l2_normalize(uint8image,dim=0) # normalize along   vertical dimension
  
    # minimum number elements in the queue after a dequeue, used to ensure 
    # that the samples are sufficiently mixed
    # I think 10 times the BATCH_SIZE is sufficient
    min_after_dequeue = 10 * BATCH_SIZE
  
    # the maximum number of elements in the queue
    capacity = 20 * BATCH_SIZE
  
    # shuffle the data to generate BATCH_SIZE sample pairs
    data_batch = tf.train.shuffle_batch([uint8image],   batch_size=BATCH_SIZE, 
                                      capacity=capacity,   min_after_dequeue=min_after_dequeue)
  
    return data_batch
  </code></pre>
  
  <p>My question is do I get exactly 128 records every time I call this function? For etc. </p>
  
  <pre><code> batch_xs = sess.run(data_batch)
  </code></pre>
  
  <p>1) What will we be the value of batch_xs in this case? </p>
  
  <p>2) The example I used, utilizes the following code in order to assess the efficiency of the training:</p>
  
  <pre><code>encode_decode = sess.run(
    y_pred, feed_dict={X: mnist.test.images[:examples_to_show]})
  </code></pre>
  
  <p>How would I go about feeding my own test data which I've stored on another binary file? This question is related to my previous post found at <a href="https://stackoverflow.com/questions/45121382/tensorflow-autoencoder-with-custom-training-examples-from-binary-file/45121992?noredirect=1#comment77225130_45121992">Tensorflow Autoencoder with custom training examples from binary file</a>.</p>