在数据处理代码mrc_ner_dataset.py中,实体的end_position是真实end_position的后一位,即end_position+1,那么在对span做mask的时候对角线位置也应该mask掉的,即开始位置应该小于结束位置而不应该包含等于,这行代码
match_label_mask = torch.triu(match_label_mask, 0) # start should be less equal to end
是不是应该改为
match_label_mask = torch.triu(match_label_mask, 1) # start should be less to end
在数据处理代码mrc_ner_dataset.py中,实体的end_position是真实end_position的后一位,即end_position+1,那么在对span做mask的时候对角线位置也应该mask掉的,即开始位置应该小于结束位置而不应该包含等于,这行代码
match_label_mask = torch.triu(match_label_mask, 0) # start should be less equal to end
是不是应该改为match_label_mask = torch.triu(match_label_mask, 1) # start should be less to end