-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add text classification with Fluid. #606
Conversation
fluid/text_classification/train.py
Outdated
vocab = {} | ||
with open(filename) as f: | ||
wid = 0 | ||
for line in f: |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
fluid/text_classification/train.py
Outdated
# The training data set. | ||
train_reader = paddle.batch( | ||
paddle.reader.shuffle( | ||
paddle.dataset.imdb.train(word_dict), buf_size=5000), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把这个buf_size改到5w+,把数据一次性都读进来再测试一个pass的时间。
There was a problem hiding this comment.
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
…sification Add the text classification example for Fluid.
resolve #605