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."
tf.VarLenFeature creates SparseTensor. And most of the times the SparseTensors are associated with the mini batch. Can you try it like below? 

dataset = tf.contrib.data.TFRecordDataset(filenames)

dataset = dataset.batch(batch\_size=32)

dataset = dataset.map(\_parse\_function)