def _encode_sequence(self, inputs, token_types, valid_length=None):
<EOL>word_embedding = self.word_embed(inputs)<EOL>type_embedding = self.token_type_embed(token_types)<EOL>embedding = word_embedding + type_embedding<EOL>outputs, additional_outputs = self.encoder(embedding, None, valid_length)<EOL>return outputs, additional_outputs<EOL>
Generate the representation given the input sequences.

        This is used for pre-training or fine-tuning a BERT model.