未验证 提交 09de9e4d 编写于 作者: 文幕地方's avatar 文幕地方 提交者: GitHub

fix re error (#5686)

上级 cd29d84c
...@@ -566,7 +566,7 @@ class ReInput(object): ...@@ -566,7 +566,7 @@ class ReInput(object):
end.append(entity['end']) end.append(entity['end'])
label.append(self.entities_labels[pred]) label.append(self.entities_labels[pred])
entities = np.full([max_seq_len + 1, 3], fill_value=-1) entities = np.full([max_seq_len + 1, 3], fill_value=-1, dtype=np.int64)
entities[0, 0] = len(start) entities[0, 0] = len(start)
entities[1:len(start) + 1, 0] = start entities[1:len(start) + 1, 0] = start
entities[0, 1] = len(end) entities[0, 1] = len(end)
...@@ -583,7 +583,7 @@ class ReInput(object): ...@@ -583,7 +583,7 @@ class ReInput(object):
head.append(i) head.append(i)
tail.append(j) tail.append(j)
relations = np.full([len(head) + 1, 2], fill_value=-1) relations = np.full([len(head) + 1, 2], fill_value=-1, dtype=np.int64)
relations[0, 0] = len(head) relations[0, 0] = len(head)
relations[1:len(head) + 1, 0] = head relations[1:len(head) + 1, 0] = head
relations[0, 1] = len(tail) relations[0, 1] = len(tail)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册