提交 07bf4e23 编写于 作者: K kinghuin 提交者: wuzewu

debug ernie tiny reader

上级 bfbe27f8
...@@ -13,8 +13,8 @@ python -u text_classifier.py \ ...@@ -13,8 +13,8 @@ python -u text_classifier.py \
--weight_decay=0.01 \ --weight_decay=0.01 \
--max_seq_len=128 \ --max_seq_len=128 \
--num_epoch=3 \ --num_epoch=3 \
--use_pyreader=True \ --use_pyreader=False \
--use_data_parallel=True --use_data_parallel=False
# Recommending hyper parameters for difference task # Recommending hyper parameters for difference task
# for ChineseGLUE: # for ChineseGLUE:
......
...@@ -201,8 +201,9 @@ class WSSPTokenizer(object): ...@@ -201,8 +201,9 @@ class WSSPTokenizer(object):
else: else:
in_vocab.append(unk_token) in_vocab.append(unk_token)
text = ' '.join(in_vocab) text = ' '.join(in_vocab)
ret = self.sp_model.EncodeAsPieces(text) tokens = self.sp_model.EncodeAsPieces(text)
return ret print(tokens)
return tokens
def convert_tokens_to_ids(self, tokens): def convert_tokens_to_ids(self, tokens):
return convert_by_vocab(self.vocab, tokens) return convert_by_vocab(self.vocab, tokens)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册