AttributeError: module 'tensorflow.models.embedding.gen_word2vec' has no attribute 'skipgram_word2vec'

匿名 (未验证) 提交于 2019-12-03 07:50:05

问题:

I am new to Tensorflow and I am running the tutorial of word2vec embedding code (https://github.com/tensorflow/models/tree/master/tutorials/embedding) on Tensorflow (cpu-only), OS X: 10.11.6. I installed tensorflow via pip install.

Running word2vec_basic.py can reach the expected result, but when it turns to word2vec.py and word2vec_optimized.py, the following error is displayed:

回答1:

You'll need to use bazel to build the directory, since the op 'skipgram_word2vec' is defined in C++ and not in Python.



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!