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

lstm结果是错误的是为什么呢? #9

Open
812093147 opened this issue Aug 17, 2017 · 3 comments
Open

lstm结果是错误的是为什么呢? #9

812093147 opened this issue Aug 17, 2017 · 3 comments

Comments

@812093147
Copy link

python predict.py lstm 这书的印刷质量的太差了吧,还有缺页,以后再也不买了
/usr/local/lib/python2.7/dist-packages/sklearn/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
"This module will be removed in 0.20.", DeprecationWarning)
Using TensorFlow backend.
loading model......
loading weights......
Building prefix dict from the default dictionary ...
Loading model from cache /tmp/jieba.cache
Loading model cost 0.271 seconds.
Prefix dict has been built succesfully.
1/1 [==============================] - 0s
这书的印刷质量的太差了吧,还有缺页,以后再也不买了 positive

@sichun
Copy link

sichun commented Aug 17, 2017

我也出现这个问题 似乎svm的结果更好

@flame110
Copy link

lstm 模型训练模型load的时候报错:
......
File "D:/Python/51job/textclassify/Sentiment-Analysis-master/code/Sentiment_lstm.py", line 178, in lstm_predict
model = model_from_yaml(yaml_string)
......
ValueError: Tensor conversion requested dtype int32 for Tensor with dtype float32: 'Tensor("embedding_1/random_uniform:0", shape=(8310, 100), dtype=float32)'
是keras版本的问题吗,博主用的哪个版本?我用的keras2.03
还是在生产train模型save成yaml文件前需要cast一下?请问博主知道怎么弄吗?

@sichun
Copy link

sichun commented Aug 21, 2017

之前closed issue里有人已经解答了, 我上网找到的解决方案是环境设为:
tensorflow 1.1.0
keras 1.2.2

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

3 participants