title: TensorFlow - decode_csv: Expect 3 fields but have 5 in record 0, when given 5 defaults throws: Expect 5 fields but have 3 in record 0
body: <p>I'm trying to run the example from <a href="https://www.tensorflow.org/programmers_guide/reading_data" rel="nofollow noreferrer">https://www.tensorflow.org/programmers_guide/reading_data</a>
  with my custom data that looks like:</p>
  
  <p>example_data.txt</p>
  
  <pre><code>DESC|manner|How did serfdom develop in and then leave Russia ?
  ENTY|cremat|What films featured the character Popeye Doyle ?
  DESC|manner|How can I find a list of celebrities ' real names ?
  ENTY|animal|What fowl grabs the spotlight after the Chinese Year of the Monkey ?
                                        more...
  </code></pre>
  
  <p>TensorFlow code:</p>
  
  <pre><code>import numpy as np
  import tensorflow as tf
  
  filename_queue = tf.train.string_input_producer(["example_data.txt"])
  reader = tf.TextLineReader()
  key, value = reader.read(filename_queue)
  
  record_defaults = [['hello'], ['hello'], ['hello']]
  col1, col2, col3 = tf.decode_csv(
      value, record_defaults=record_defaults, field_delim="|")
  features = tf.stack([col1, col2, col3])
  
  print(features)
  
  with tf.Session() as sess:
    # Start populating the filename queue.
    coord = tf.train.Coordinator()
    threads = tf.train.start_queue_runners(coord=coord)
  
    for i in range(1200):
      # Retrieve a single instance:
      example, label = sess.run([features, col2])
  
    coord.request_stop()
    coord.join(threads)
  </code></pre>
  
  <p>This throws an error:
  <code>Expect 3 fields but have 5 in record 0</code></p>
  
  <p>but if I change:</p>
  
  <pre><code>record_defaults = [['hello'], ['hello'], ['hello'], ['hello'], ['hello']]
      col1, col2, col3, col4, col5 = tf.decode_csv(
          value, record_defaults=record_defaults, field_delim="|")
  </code></pre>
  
  <p>This throws an error:
  <code>Expect 5 fields but have 3 in record 0</code></p>
  
  <p>What is happening? is this a bug in TensorFlow?</p>