We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
您好,
请问用attention_mask做crf的mask的话,一个word假设有多个sub tokens,那这些tokens都就都keep了。在bert for ner里面,是用一个词的第一个token做的classification。
https://github.com/lonePatient/BERT-NER-Pytorch/blob/master/models/bert_for_ner.py#L64 同时在decode的时候
BERT-NER-Pytorch/run_ner_crf.py
Line 210 in 38326e1
此处的mask也是attention mask。那么就会导致从CLS到SEP还有其中的所有token都会被keep,用于做decode。请问此处mask这样设置合理么?还是应该只保留每个word的第一个token呢?谢谢!
The text was updated successfully, but these errors were encountered:
@DanqingZ 大部分中文NER数据都是char分开了,##token英文数据系多点,可以简单修改下就行了,短时间内可能没空去修改了,正在写论文。后续我对英文数据适配下 。
Sorry, something went wrong.
好的,明白了!那请问CLS和SEP应该keep么,如果是用attention mask这两个也传给CRF了。
No branches or pull requests
您好,
请问用attention_mask做crf的mask的话,一个word假设有多个sub tokens,那这些tokens都就都keep了。在bert for ner里面,是用一个词的第一个token做的classification。
https://github.com/lonePatient/BERT-NER-Pytorch/blob/master/models/bert_for_ner.py#L64
同时在decode的时候
BERT-NER-Pytorch/run_ner_crf.py
Line 210 in 38326e1
此处的mask也是attention mask。那么就会导致从CLS到SEP还有其中的所有token都会被keep,用于做decode。请问此处mask这样设置合理么?还是应该只保留每个word的第一个token呢?谢谢!
The text was updated successfully, but these errors were encountered: