def __init__(self, ctx=mx.cpu(), dtype='<STR_LIT>', model='<STR_LIT>',<EOL>dataset_name='<STR_LIT>', params_path=None,<EOL>max_seq_length=<NUM_LIT>, batch_size=<NUM_LIT>):
self.ctx = ctx<EOL>self.dtype = dtype<EOL>self.max_seq_length = max_seq_length<EOL>self.batch_size = batch_size<EOL>self.dataset_name = dataset_name<EOL>self.bert, self.vocab = gluonnlp.model.get_model(model,<EOL>dataset_name=self.dataset_name,<EOL>pretrained=params_path is None,<EOL>ctx=self.ctx,<EOL>use_pooler=False,<EOL>use_decoder=False,<EOL>use_classifier=False)<EOL>self.bert.cast(self.dtype)<EOL>if params_path:<EOL><INDENT>logger.info('<STR_LIT>', params_path)<EOL>self.bert.load_parameters(params_path, ctx=ctx, ignore_extra=True)<EOL><DEDENT>lower = '<STR_LIT>' in self.dataset_name<EOL>self.tokenizer = BERTTokenizer(self.vocab, lower=lower)<EOL>self.transform = BERTSentenceTransform(tokenizer=self.tokenizer,<EOL>max_seq_length=self.max_seq_length,<EOL>pair=False)<EOL>
Encoding from BERT model.

Parameters
----------
ctx : Context.
    running BertEmbedding on which gpu device id.
dtype: str
    data type to use for the model.
model : str, default bert_12_768_12.
    pre-trained BERT model
dataset_name : str, default book_corpus_wiki_en_uncased.
    pre-trained model dataset
params_path: str, default None
    path to a parameters file to load instead of the pretrained model.
max_seq_length : int, default 25
    max length of each sequence
batch_size : int, default 256
    batch size