Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

word2vec code not work #6

Open
Prayforhanluo opened this issue Apr 17, 2017 · 2 comments
Open

word2vec code not work #6

Prayforhanluo opened this issue Apr 17, 2017 · 2 comments

Comments

@Prayforhanluo
Copy link

训练的时候,报错:
Input 'y' of 'Mul' Op has type float32 that does not match type int32 of argument 'x'.

关于这行代码:loss=tf.reduce_mean(tf.nn.nce_loss(nce_weights, nce_bias, embed, train_labels, num_sampled, num_classes=vocabulary_size))

我想是tensorflow的版本问题还是什么原因?

@LouisScorpio
Copy link
Owner

@Prayforhanluo 版本是0.12
不知道你是不是用的我给的数据集,报错提示在进行操作时,输入和设定的数据类型不一致,一个是int32一个是float32,可以跟一下代码看看

@Prayforhanluo
Copy link
Author

@LouisScorpio tensorflow的版本原因 换成一致的版本可以运行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants