BERT的輸入中,[CLS]和[SEP]應該被放在哪?


 

Token embeddings: A [CLS] token is added to the input word tokens at the beginning of the first sentence and a [SEP] token is inserted at the end of each sentence.

之前以為每個句子都會插入一對【CLS】和【SEP】,於是就有了第一句的【SEP】和第二句的【CLS】怎么處理的疑惑,現在看來,在多個句子里,【CLS】只在最前面插入一次,后面每個句子都插入一個【SEP】。不過,這個應該是指一次輸入,對於第二次輸入,應該也會在輸入開頭插入【CLS】。

 

【link】


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM