Skip to content

Commit

Permalink
fix bigru crf offset index error (#3418)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunnYu authored Oct 9, 2022
1 parent c297ab0 commit 2dfdfa0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_tipc/bigru_crf/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def parse_result(words, preds, lengths, word_vocab, label_vocab):
for index in words[sent_index][:lengths[sent_index]]
]
tags = [
id2label_dict[index]
id2label_dict.get(index, 'O')
for index in preds[sent_index][:lengths[sent_index]]
]

Expand Down
2 changes: 1 addition & 1 deletion tests/test_tipc/bigru_crf/deploy/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def parse_result(words, preds, lengths, word_vocab, label_vocab):
for index in words[sent_index][:lengths[sent_index]]
]
tags = [
id2label_dict[index]
id2label_dict.get(index, 'O')
for index in preds[sent_index][:lengths[sent_index]]
]

Expand Down

0 comments on commit 2dfdfa0

Please sign in to comment.