I wrote a sequence of features into TFRecord file by below function, no issue to write:
def write_tfrecords(x, y, filename): writer = tf.io.TFRecordWriter(fil