How can i extract word-embedding
mathshangw opened this issue · 2 comments
mathshangw commented
sorry for the late reply , i need to extract word-embedding
Originally posted by @mathshangw in #6 (comment)
yxuansu commented
sorry for the late reply , i need to extract word-embedding
Originally posted by @mathshangw in #6 (comment)
Hi,
You can refer to this line to extract the features from TaCL. The attention_hidden_states[0] is the word embedding that you want.
mathshangw commented
Thanks for replying and sorry for my late reply. i get that BERT work on sub-words basically but my problem is to get the word-embedding how it could be calculated or does the line you mentioned is for word, not sub-word embedding , please?