AttributeError:module'tensorflow.models.embedding.gen_word2vec'没有属性'skipgram_word2vec' [英] AttributeError: module 'tensorflow.models.embedding.gen_word2vec' has no attribute 'skipgram_word2vec'

查看:826
本文介绍了AttributeError:module'tensorflow.models.embedding.gen_word2vec'没有属性'skipgram_word2vec'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Tensorflow的新手,我正在运行word2vec嵌入代码的教程(构建目录,因为op'skipgram_word2vec'在C ++中定义,而不是在Python中定义。


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:

解决方案

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

这篇关于AttributeError:module'tensorflow.models.embedding.gen_word2vec'没有属性'skipgram_word2vec'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆