Skip to content

Instantly share code, notes, and snippets.

@sid321axn
Created August 7, 2020 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sid321axn/73373f534e7ea6d79c2d98e58eb92b07 to your computer and use it in GitHub Desktop.
Save sid321axn/73373f534e7ea6d79c2d98e58eb92b07 to your computer and use it in GitHub Desktop.
# note that we set trainable = False so as to keep the embeddings fixed
embedding_layer = Embedding(
num_words,
EMBEDDING_DIM,
weights=[embedding_matrix],
input_length=MAX_SEQUENCE_LENGTH,
trainable=False
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment