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

question about cnn embedding dim and lstm dim #61

Closed
zxgineng opened this issue Jul 4, 2018 · 1 comment
Closed

question about cnn embedding dim and lstm dim #61

zxgineng opened this issue Jul 4, 2018 · 1 comment

Comments

@zxgineng
Copy link

zxgineng commented Jul 4, 2018

In code both cnn embedding dim and individual lstm outputs dim are 512.
The paper says it would compute a task specific weighting of all biLM layers.
The biLM layers embedding is concatenation of [foreward-lstm, backward-lstm] , so the dim should be 1024.
So how to compute a weighting between biLM layers embedding(1024) and cnn embedding(512)? How to add them with different dim

@matt-peters
Copy link
Contributor

We duplicate and concatenate the CNN layer to form a 1024 dim vector before weighting with the [forward-lstm, backward-lstm] layers. You can see this here: https://github.com/allenai/bilm-tf/blob/master/bilm/model.py#L120

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