Embeddings
Use TensorFlow's built-in functions for creating embeddings.
We'll cover the following...
Chapter Goals:
- Use TensorFlow feature columns to create input embeddings
A. Feature columns
So far, we've dealt with pre-training an embedding model as well as training an embedding model in tandem with an LSTM. In both of these cases, we had to write our own embedding matrix and handle its initialization.
A third option for incorporating word embeddings into your LSTM training model is by using TensorFlow's feature column API. Most of these feature columns won't be discussed in this course, since they aren't directly relevant to NLP.
The feature column function we will focus on is tf.feature_column.embedding_column
. It lets ...