Open leonaxiongxin opened 4 years ago
你好,对于crf_loss的计算有个疑问
在Chinese_ner项目的crf_loss层用的是num_tags+1对输出的头和尾加上了一个类似和的标签,用来计算转移概率。 https://github.com/FuYanzhe2/Name-Entity-Recognition/blob/598b264262d667257c9e26646c49df45f7d76547/Chinese_ner/model.py#L182
但是在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]吗?
[CLS]
[SEP]
你好,对于crf_loss的计算有个疑问
在Chinese_ner项目的crf_loss层用的是num_tags+1对输出的头和尾加上了一个类似和的标签,用来计算转移概率。
https://github.com/FuYanzhe2/Name-Entity-Recognition/blob/598b264262d667257c9e26646c49df45f7d76547/Chinese_ner/model.py#L182
但是在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]
吗?