num_labels in crf_layer ?
Opened this issue · 0 comments
leonaxiongxin commented
你好,对于crf_loss的计算有个疑问
在Chinese_ner项目的crf_loss层用的是num_tags+1对输出的头和尾加上了一个类似和的标签,用来计算转移概率。
Name-Entity-Recognition/Chinese_ner/model.py
Line 182 in 598b264
但是在BERT-BiLSTM-CRF-NER项目的crf_loss层用的是num_labels,
https://github.com/FuYanzhe2/Name-Entity-Recognition/blob/master/BERT-BiLSTM-CRF-NER/lstm_crf_layer.py#L138
这是因为BERT输出的embedding已经包括[CLS]
和[SEP]
吗?