tensorflow_cookbook icon indicating copy to clipboard operation
tensorflow_cookbook copied to clipboard

Update 07_sentiment_with_doc2vec.py

Open RomanGurinovich opened this issue 7 years ago • 1 comments

When run on custom text file with vocab len != 7500, close_word = word_dictionary_rev[nearest[k]] throws KeyValue error.

Looking in the range of the len(word_dictionary_rev)]) generalizes the code.

RomanGurinovich avatar Nov 09 '18 07:11 RomanGurinovich

Ah yes, thanks for this. I'll merge this in the next week or so. I want to keep this active as a reminder that I should fix the jupyter notebook as well.

nfmcclure avatar Nov 09 '18 17:11 nfmcclure