aymericdamien / TensorFlow-Examples

TensorFlow Tutorial and Examples for Beginners (support TF v1 & v2)
Other
43.43k stars 14.94k forks source link

fixes for Word2Vec for Python 3 #389

Open SomePersonSomeWhereInTheWorld opened 4 years ago

SomePersonSomeWhereInTheWorld commented 4 years ago

Thanks to https://zhuanlan.zhihu.com/p/150579437

Change this line:

# Evaluation Parameters.
eval_words = [b'five', b'of', b'going', b'hardware', b'american', b'britain']

and https://stackoverflow.com/a/53401158/7606730 replace xrangewith range