# Module: tf.keras.preprocessing.sequence

<br />

|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/sequence) |

Utilities for preprocessing sequence data.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.keras.preprocessing.sequence`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/keras/preprocessing/sequence)

<br />

## Classes

[`class TimeseriesGenerator`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/preprocessing/sequence/TimeseriesGenerator): Utility class for generating batches of temporal data.

## Functions

[`make_sampling_table(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/preprocessing/sequence/make_sampling_table): Generates a word rank-based probabilistic sampling table.

[`pad_sequences(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/preprocessing/sequence/pad_sequences): Pads sequences to the same length.

[`skipgrams(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/preprocessing/sequence/skipgrams): Generates skipgram word pairs.