Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model outputs tuples #22

Closed
yjiang18 opened this issue Nov 17, 2020 · 1 comment
Closed

Model outputs tuples #22

yjiang18 opened this issue Nov 17, 2020 · 1 comment

Comments

@yjiang18
Copy link

Hi, could you explain how you generate the tweet sentence embedding please? I check the shape of the output based on the example, features = bertweet(input_ids) seems to have embeddings of each token in feature[0] (e.g., [1,20,768]) and tweet sentence embedding in feature[1] (e.g., [1, 768])? If so, please could you let me know how you generate feature[1]? Is it based on [CLS] token or simply average the whole word token embeddings? Thanks!

@datquocnguyen
Copy link
Member

As far as I understand it is based on the [CLS] token. However, I am not 100% sure.
You might ask the HuggingFace transformers team for the final confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants