You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.
I use the following code to get the features of a given text in PyTorch.
from transformers import AlbertTokenizer, AlbertModel
tokenizer = AlbertTokenizer.from_pretrained('albert-base-v2')
model = AlbertModel.from_pretrained("albert-base-v2")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='pt')
output = model(**encoded_input)
The result of output is shown in the figure.
output consists of two tensor. Are they both the deep features of a given text ?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I use the following code to get the features of a given text in PyTorch.
The result of
output
is shown in the figure.output
consists of two tensor. Are they both the deep features of a given text ?The text was updated successfully, but these errors were encountered: