Timeline for How can i get the vector of word using BERT?
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 15, 2022 at 22:31 | comment | added | user5520049 | exucse me i read that the word embedding by concatenating the last four layers(word_emb_6), giving us a single word vector per token. Each vector will have a length 4 x 768 = 3,072. All other word embeddings have the 768 length vectors per token. I'm confused about sub-words and words embedding in BERT | |
Jan 15, 2022 at 13:59 | comment | added | user5520049 | thanks a lot for replying. my specific task if i need to represent the embedding layer for image captioning task i need to represent the vectors for each word in the sentence so if you please do you see that the second code is suitable for this task ? i updated my question too with my result | |
Jan 15, 2022 at 9:21 | comment | added | noe | I updated my answer referring to the second piece of code you posted. | |
Jan 15, 2022 at 9:20 | history | edited | noe | CC BY-SA 4.0 |
added 303 characters in body
|
Jan 14, 2022 at 17:22 | comment | added | user5520049 |
thank a lot for answering but excuse me do you mean that i need to loop in words not sentences right ? i mean here in this line for w in words: instead of for i in sentences: if so how can i get words in the sentences , does tokenization return them ?
|
|
Jan 14, 2022 at 16:01 | history | answered | noe | CC BY-SA 4.0 |