Skip to content

Commit 90eb498

Browse files
author
QiaoZiqing
committed
Fixed the bugs caused by the version update of transformers.
1 parent 9ef8671 commit 90eb498

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

opennre/encoder/bert_encoder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def forward(self, token, att_mask, pos1, pos2):
2929
(B, H), representations for sentences
3030
"""
3131
_, x = self.bert(token, attention_mask=att_mask, return_dict=False)
32+
#return_dict=fault is set to adapt to the new version of transformers
3233
return x
3334

3435
def tokenize(self, item):

0 commit comments

Comments
 (0)