import tensorflow as tf

    return (tf.data.TextLineDataset([filename])
            .flat_map(_to_chars)
            .repeat()
            .batch(tf.to_int64(sequence_size))
            .shuffle(1000)
            .batch(tf.to_int64(batch_size)))
