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 text classification with Fluid. #606

Merged
merged 2 commits into from
Jan 31, 2018

Conversation

peterzhang2029
Copy link
Contributor

resolve #605

vocab = {}
with open(filename) as f:
wid = 0
for line in f:
Copy link
Collaborator

Choose a reason for hiding this comment

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

for idx, line in enumerate(f)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

# The training data set.
train_reader = paddle.batch(
paddle.reader.shuffle(
paddle.dataset.imdb.train(word_dict), buf_size=5000),
Copy link
Collaborator

Choose a reason for hiding this comment

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

把这个buf_size改到5w+,把数据一次性都读进来再测试一个pass的时间。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, the result is in the bottom of this issue #607

@lcy-seso lcy-seso merged commit 124afdb into PaddlePaddle:develop Jan 31, 2018
dragonwarrior pushed a commit to dragonwarrior/models that referenced this pull request Feb 1, 2018
…sification

Add the text classification example for Fluid.
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

Successfully merging this pull request may close these issues.

Add text classification with Fluid.
2 participants