Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created March 6, 2019 18:46
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 prateekjoshi565/c965598a9530df9c682e744b4bada581 to your computer and use it in GitHub Desktop.
Save prateekjoshi565/c965598a9530df9c682e744b4bada581 to your computer and use it in GitHub Desktop.
elmo example
# just a random sentence
x = ["Roasted ants are a popular snack in Columbia"]
# Extract ELMo features
embeddings = elmo(x, signature="default", as_dict=True)["elmo"]
embeddings.shape
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment