Skip to content

Instantly share code, notes, and snippets.

@chricke
Created March 26, 2019 12:00
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 chricke/bfa96c059938f3d065e2aea82d765859 to your computer and use it in GitHub Desktop.
Save chricke/bfa96c059938f3d065e2aea82d765859 to your computer and use it in GitHub Desktop.
Pick next word
def pick_word(probabilities, int_to_vocab):
word_id = np.argmax(probabilities)
word_string = int_to_vocab[word_id]
return word_string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment