Created
March 26, 2019 12:00
-
-
Save chricke/bfa96c059938f3d065e2aea82d765859 to your computer and use it in GitHub Desktop.
Pick next word
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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