Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Tensorflow Bert implementation

from transformers import BertTokenizer, TFBertModel
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
model = TFBertModel.from_pretrained("bert-base-uncased")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='tf')
output = model(encoded_input)
Source by huggingface.co #
 
PREVIOUS NEXT
Tagged: #Tensorflow #Bert #implementation
ADD COMMENT
Topic
Name
2+4 =