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

About Attention #5

Open
qinya opened this issue Apr 20, 2018 · 3 comments
Open

About Attention #5

qinya opened this issue Apr 20, 2018 · 3 comments

Comments

@qinya
Copy link

qinya commented Apr 20, 2018

What should I do if I follow the attention layer behind the CRF layer?

@ningshixian
Copy link
Owner

What do you specifically mean?

@qinya
Copy link
Author

qinya commented Apr 23, 2018

I want to connect CRF behind LSTM+Attention and do NER. I tried but failed. I added CRF when calculating loss.

@ningshixian
Copy link
Owner

you can do it like this,

output = Bidirectional(LSTM())
output = AttentionDecoder()(output)
output = TimeDistributed(Dense(num_class))(output)
output = crf(output)

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