Created
March 9, 2020 16:55
-
-
Save hanneshapke/ef38bd445097d5002972812237fd7622 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow_text as text | |
| vocab_file_path = bert_layer.resolved_object.vocab_file.asset_path.numpy() | |
| do_lower_case = bert_layer.resolved_object.do_lower_case.numpy() | |
| bert_tokenizer = text.BertTokenizer( | |
| vocab_lookup_table=vocab_file_path, | |
| token_out_type=tf.int64, | |
| lower_case=do_lower_case | |
| ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment