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

the last ouput of Bi-RNN in TextRNN #27

Closed
longbowking opened this issue Jan 3, 2018 · 1 comment
Closed

the last ouput of Bi-RNN in TextRNN #27

longbowking opened this issue Jan 3, 2018 · 1 comment

Comments

@longbowking
Copy link

self.output_rnn_last=tf.reduce_mean(output_rnn,axis=1) #[batch_size,hidden_size*2] #output_rnn_last=output_rnn[:,-1,:] ##[batch_size,hidden_size*2] #TODO

In the implementation, the final outputs of Bi-RNN are calculated as the reduce mean among all time stamps. Compared with output_rnn_last=output_rnn[:,-1,:], what is the difference between these two strategies on the impact of the final classification results?

@brightmart
Copy link
Owner

hi,
you post a good question. the difference is whether you use mean average of all timestamp or use last timestamp to make a prediction; the other way is use reduce_max to make a prediction.

so you can choose the way that the best performance among these three methods.

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

2 participants