Last active
February 20, 2022 22:39
-
-
Save shayaf84/c2a22909228143f6819be23360779926 to your computer and use it in GitHub Desktop.
This file contains 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
!pip install tensorflow-text | |
import tensorflow_hub as hub | |
import tensorflow_text as text | |
#Use the bert preprocesser and bert encoder from tensorflow_hub | |
bert_preprocess = hub.KerasLayer("https://tfhub.dev/tensorflow/bert_en_uncased_preprocess/3") | |
bert_encoder = hub.KerasLayer('https://tfhub.dev/tensorflow/bert_en_uncased_L-12_H-768_A-12/4') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment