import tensorflow as tf


    feature_dict = {
        k: tf.train.Feature(bytes_list=tf.train.BytesList(
            value=[memoryview(v).tobytes()])) for k, v in data.items()}

    return tf.train.Example(
        features=tf.train.Features(feature=feature_dict)).SerializeToString()

  def _deserialize(self, serialized_data, batch_size):
    """Convert serialized TFRecords into tensors.

    Args:
