-
Notifications
You must be signed in to change notification settings - Fork 14
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
Init commit for DynRNN understand sentiment #30
Conversation
rnn.output(hidden) | ||
|
||
last = fluid.layers.sequence_pool(rnn(), 'last') | ||
logit = fluid.layers.fc(input=last, size=2, act='softmax') |
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.
We obey the convention that split model out of data pipeline,
just like https://github.com/dzhwinter/benchmark/blob/master/fluid/resnet.py#L75 .
cPickle.dump(word_dict, f, cPickle.HIGHEST_PROTOCOL) | ||
|
||
|
||
def cache_reader(reader, clean): |
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.
We do not have a unified way to accelerate our benchmark demos. I doubt about the reasonability of caching the dataset with CPickle when do benchmark.
@@ -0,0 +1,193 @@ | |||
import argparse |
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.
We have a old one understand_sentiment_dynamic_rnn.py, I think we can delete that one and replace with this one?
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.
We can merge this PR and refine the io part style same with other scripts
Dynamic RNN 情感分类