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

Add Inference example and unit test for understand sentiment #8251

Merged
merged 5 commits into from
Feb 9, 2018

Conversation

kexinzhao
Copy link
Contributor

fix #7956

@kexinzhao kexinzhao added the 预测 原名Inference,包含Capi预测问题等 label Feb 8, 2018
@kexinzhao kexinzhao requested review from sidgoyal78 and Xreki February 8, 2018 00:59
@Xreki
Copy link
Contributor

Xreki commented Feb 9, 2018

Need to update to the develop branch to fix the conflict. Also the definition of TestInference is modified in #8227 .

fetch_targets] = fluid.io.load_inference_model(save_dirname, exe)

lod = [0, 4, 10]
tensor_words = create_random_lodtensor(lod, place, low=0, high=1)
Copy link
Contributor

@sidgoyal78 sidgoyal78 Feb 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can extend the high to len(word_dict) - 1
We can get word_dict as: word_dict = paddle.dataset.imdb.word_dict()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! Done

Copy link
Contributor

@sidgoyal78 sidgoyal78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kexinzhao kexinzhao merged commit 4b62fcd into PaddlePaddle:develop Feb 9, 2018
@kexinzhao kexinzhao deleted the inf_understand_sentiment branch February 9, 2018 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
预测 原名Inference,包含Capi预测问题等
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add inference example for understand_sentiment as unit test
3 participants