Skip to content
Snippets Groups Projects
Unverified Commit 0451cb4c authored by aaa123git's avatar aaa123git Committed by GitHub
Browse files

fix bug. len(word_seq) <= 510, since self.dataloader.pad_batch add two special tokens (#190)

parent b136fa9a
No related branches found
No related tags found
No related merge requests found
...@@ -81,8 +81,8 @@ class BERTNLU(NLU): ...@@ -81,8 +81,8 @@ class BERTNLU(NLU):
da = {} da = {}
word_seq, tag_seq, new2ori = self.dataloader.bert_tokenize(ori_word_seq, ori_tag_seq) word_seq, tag_seq, new2ori = self.dataloader.bert_tokenize(ori_word_seq, ori_tag_seq)
word_seq = word_seq[:512] word_seq = word_seq[:510]
tag_seq = tag_seq[:512] tag_seq = tag_seq[:510]
batch_data = [[ori_word_seq, ori_tag_seq, intents, da, context_seq, batch_data = [[ori_word_seq, ori_tag_seq, intents, da, context_seq,
new2ori, word_seq, self.dataloader.seq_tag2id(tag_seq), self.dataloader.seq_intent2id(intents)]] new2ori, word_seq, self.dataloader.seq_tag2id(tag_seq), self.dataloader.seq_intent2id(intents)]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment