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

debug ernie tiny reader

上级 bfbe27f8
......@@ -13,8 +13,8 @@ python -u text_classifier.py \
--weight_decay=0.01 \
--max_seq_len=128 \
--num_epoch=3 \
--use_pyreader=True \
--use_data_parallel=True
--use_pyreader=False \
--use_data_parallel=False
# Recommending hyper parameters for difference task
# for ChineseGLUE:
......
......@@ -201,8 +201,9 @@ class WSSPTokenizer(object):
else:
in_vocab.append(unk_token)
text = ' '.join(in_vocab)
ret = self.sp_model.EncodeAsPieces(text)
return ret
tokens = self.sp_model.EncodeAsPieces(text)
print(tokens)
return tokens
def convert_tokens_to_ids(self, 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.
先完成此消息的编辑!
想要评论请 注册