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 embedding matrix structure #7

Closed
tongjinle123 opened this issue Mar 27, 2018 · 3 comments
Closed

about embedding matrix structure #7

tongjinle123 opened this issue Mar 27, 2018 · 3 comments

Comments

@tongjinle123
Copy link

tongjinle123 commented Mar 27, 2018

Thanks for the brillient code.
I have noticed a santence in the paper:

"all the out-of-vocabulary words are mapped to a token ,whose embedding is trainable with random initialization." which not in your code. (they used a pretrained matrix)That seems make sence.
Do that works for the model?

@ghost
Copy link

ghost commented Mar 27, 2018

Hi @tongjinle123 , you're right about fine tuning the unknown_word vectors. The paper suggests learning the unknown word vectors and we should do it.
I am just not too sure what the most elegant way to do this is in tensorflow. I am open to suggestions so if anyone has a brilliant idea to do this please let me know. Or even better, pull request!

Problem:
We want to fix word embeddings but fine-tune 1 word vector for token "Unk" (token for all unknown words). We only look up with 1 word embeddings vector which makes partial training difficult.

@tongjinle123
Copy link
Author

tongjinle123 commented Mar 28, 2018

To be frankly, i am wondering if keeping the pre-trained matrix freezed is reasonable.I think that no one could ensure the matrix is well trained for our task. Why not taking a second train?

Could you please share a paper,artical or experiment which is talking about this problem with me?
When it comes to the way to the implemention, i had a mind-storm-thought that define pre-trained matrix and unk matrix separately using tf.get_variable, run a concat op before trainop and run a assign op after trainop assigning the unk value to the unk matrix. I think that will not consume much time.

sorry for the bad comment format.... QAQ

@ghost
Copy link

ghost commented Apr 26, 2018

Refer to #13 for this issue.

@ghost ghost closed this as completed Apr 26, 2018
This issue was closed.
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

1 participant