I want to use Tensorflow\'s Dataset API to read TFRecords file of lists of variant length. Here is my code.
def _int64_feature(value):
# value must be
The error is very simple. Your data is not FixedLenFeature it is VarLenFeature. Replace your line:
'data':tf.FixedLenFeature([], tf.int64)}
with
'data':tf.VarLenFeature(tf.int64)}
Also, when you call print(i.eval()) and print(data.eval()) you are calling the iterator twice. The first print will print 0, but the second one will print the value of the second row [ 0, 50, 89, 147, 196]. You can do print(sess.run([i, data])) to get i and data from the same row.