Bert-BiLSTM-CRF-pytorch
Bert-BiLSTM-CRF-pytorch copied to clipboard
感觉_score_sentence方法错了
score = score +
batch_transitions.gather(-1, (label_ids[:, t] * self.tagset_size + label_ids[:, t - 1]).view(-1, 1))
+ feats[:, t].gather(-1, label_ids[:, t].view(-1, 1)).view(-1, 1)
是否应该变为
score = score +
batch_transitions.gather(-1, (label_ids[:, t-1] * self.tagset_size + label_ids[:, t ]).view(-1, 1))
+ feats[:, t].gather(-1, label_ids[:, t].view(-1, 1)).view(-1, 1)
真实分数不应该是前一个到后一个的lable的分数吗 是不是做反了