title: TFRecord feature has wrong value
body: <p>I am trying to train some embeddings and am putting my dataset into tfrecord form. When I write one example to the file like so:</p>
  
  <pre><code>tf_features = {
          'given': int64_feature(given),
          'context': bytes_feature(np.array(context).tostring())
  }
  writer.write(tf.train.Example(features=tf.train.Features(feature=tf_features)).SerializeToString())
  </code></pre>
  
  <p>where <code>int64_feature</code> and <code>bytes_feature</code> are defines as:</p>
  
  <pre><code>def bytes_feature(val):
      return tf.train.Feature(bytes_list=tf.train.BytesList(value=[val]))
  
  def int64_feature(val):
      return tf.train.Feature(int64_list=tf.train.Int64List(value=[val]))
  </code></pre>
  
  <p>and I print out an example (given, context) pair, I get something like: <code>(698, [686, 439, 464, 775])</code> which is fine.</p>
  
  <p>However, when I try to read from the same file like so:</p>
  
  <pre><code>def parse_example(w, tf_example):
      feats_dict = {
          'given': tf.FixedLenFeature([], tf.int64, default_value=0),
          'context': tf.FixedLenFeature([], tf.string)
      }
      features = tf.parse_single_example(tf_example, feats_dict)
      context = tf.decode_raw(features['context'], tf.int64)
  
      context_feats = dict()
      ctx_idx = 0
      for i in range(w):
          if i == w//2: continue
          context_feats['context%d' % ctx_idx] = context[ctx_idx]
          ctx_idx += 1
  
      return context_feats, features['given']
  
  dataset = tf.data.TFRecordDataset([fname]).map(partial(parse_example, 5))
  iterator = dataset.make_one_shot_iterator()
  
  with tf.Session() as sess:
      iter_features, iter_labels = iterator.get_next()
      features = sess.run(iter_features)
      labels = sess.run(iter_labels)
      print(features, labels)
  </code></pre>
  
  <p>For the same context pair as before, I get <code>(464, [686, 439, 464, 775])</code>. The given label is always the third from the context labels.</p>
  
  <p>I've been staring at this code for hours but am stumped. Anyone know what's going on?</p>