I have tensorflow program that work with TFRecord and i want to read the data with tf.contrib.data.TFRecordDataset but when i try to parse the example i get an exception: "TypeError: Failed to convert object of type to Tensor"
When trying with only

The code is: 

```
def _parse_function(example_proto):
    features = {"var_len_feature": tf.VarLenFeature(tf.float32),
                 "FixedLenFeature": tf.FixedLenFeature([10], tf.int64),
                 "label": tf.FixedLenFeature((), tf.int32default_value=0)}

parsed_features = tf.parse_single_example(example_proto, features)
return parsed_features["image"], parsed_features["label"]

filenames = ["/var/data/file1.tfrecord", "/var/data/file2.tfrecord"]
dataset = tf.contrib.data.TFRecordDataset(filenames)
dataset = dataset.map(_parse_function)

```
['https://Stackoverflow.com/questions/46467481', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1211587/']
TensorFlow added support for this in v1.5

<https://github.com/tensorflow/tensorflow/releases/tag/v1.5.0>

"tf.data now supports tf.SparseTensor components in dataset elements."
The Tutorial in the Tensor Flow programming [guide](https://www.tensorflow.org/programmers_guide/datasets#parsing_tfexample_protocol_buffer_messages) have a different indenting.

```
# Transforms a scalar string `example_proto` into a pair of a scalar string and
# a scalar integer, representing an image and its label, respectively.
def _parse_function(example_proto):
  features = {"image": tf.FixedLenFeature((), tf.string, default_value=""),
              "label": tf.FixedLenFeature((), tf.int32, default_value=0)}
  parsed_features = tf.parse_single_example(example_proto, features)
  return parsed_features["image"], parsed_features["label"]

# Creates a dataset that reads all of the examples from two files, and extracts
# the image and label features.
filenames = ["/var/data/file1.tfrecord", "/var/data/file2.tfrecord"]
dataset = tf.contrib.data.TFRecordDataset(filenames)
dataset = dataset.map(_parse_function)

```

The wrong indenting can result in a TypeError, processing an unwanted control flow by the pyton interpreter.