What is the difference between using the embedding layer inside the model and outside the model? I can build the embedding layer into the model:
model = tf.keras.Sequential()
model.add(tf.keras.layers.Embedding(input_dim=1000, output_dim=64, input_length=10))
...
model.fit(features, target ...)
I can also use embdedding outside the model to generate embedded data and then feed it into the model:
embedding_encoder = tf.keras.layers.Embedding(input_dim=1000, output_dim=64)
embedded_features = embedding_encoder(features)
...
model.fit(embedded_features, target ...)
Does it mean that if I use embedding outside the model, embedding parameters are not learned during the training?