Skip to content
Snippets Groups Projects
Commit 51750dcc authored by i-robot's avatar i-robot Committed by Gitee
Browse files

!764 fix bug when processing data

Merge pull request !764 from 杨羽频/master
parents 93973b9b c3abfb59
No related branches found
No related tags found
No related merge requests found
......@@ -89,7 +89,7 @@ class ErnieTextFieldReader():
padded_ids, input_mask = pad_batch_data(src_ids,
pad_idx=self.field_config.padding_id,
return_input_mask=True,
return_seq_lens=True)
return_seq_lens=False)
sent_ids_batch = pad_batch_data(sentence_ids, pad_idx=self.field_config.padding_id)
pos_ids_batch = pad_batch_data(position_ids, pad_idx=self.field_config.padding_id)
......
......@@ -136,7 +136,7 @@ class BpeEncoder():
j = word.index(first, i)
new_word.extend(word[i:j])
i = j
except IOError:
except ValueError:
new_word.extend(word[i:])
break
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment