Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Last active July 17, 2020 14:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
# sample data
text = ["this is a bert model tutorial", "we will fine-tune a bert model"]
# encode text
sent_id = tokenizer.batch_encode_plus(text, padding=True)
# output
print(sent_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment