nfmcclure / tensorflow_cookbook

Code for Tensorflow Machine Learning Cookbook
https://www.packtpub.com/big-data-and-business-intelligence/tensorflow-machine-learning-cookbook-second-edition
MIT License
6.23k stars 2.41k forks source link

07_NaturalLanguageProcessing_04_SkipGram: Suggestion for line 270 valid_word #121

Closed ychong closed 6 years ago

ychong commented 6 years ago

Suggestion for a shorter implementation of line 270 for 'valid_word':

Old: valid_word = word_dictionary_rev[valid_examples[j]]

Suggestion/New: valid_word = valid_words[j]

nfmcclure commented 6 years ago

Thanks! I'll update this code when I get to chapter 7 with all the new updates (version 2 of the book coming soon).

nfmcclure commented 6 years ago

This should be fixed now.