Data Preparation for Variable Length Input Sequences
Last Updated on August 14, 2019
Deep learning libraries assume a vectorized representation of your data.
In the case of variable length sequence prediction problems, this requires that your data be transformed such that each sequence has the same length.
This vectorization allows code to efficiently perform the matrix operations in batch for your chosen deep learning algorithms.
In this tutorial, you will discover techniques that you can use to prepare your variable length sequence data for sequence prediction problems in Python with Keras.
After completing this tutorial, you will know:
- How to pad variable length sequences with dummy values.
- How to pad variable length sequences to a new longer desired length.
- How to truncate variable length sequences to a shorter desired length.
Kick-start your project with my new book Long Short-Term Memory Networks With Python, including step-by-step tutorials and the Python source code files for all examples.
Let’s get started.