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

关于自然语言理解任务的问题 #34

Open
JaheimLee opened this issue Jan 11, 2022 · 2 comments
Open

关于自然语言理解任务的问题 #34

JaheimLee opened this issue Jan 11, 2022 · 2 comments

Comments

@JaheimLee
Copy link

JaheimLee commented Jan 11, 2022

Hi,我想和你们确认个问题。Huggingface的模型在文本分类任务上用BertForSequenceClassification这个类时,其中用到的是bert的pooled_output结果,然后接最终的一层classifier输出。而你们论文中说:“We build the downstream models for the natural language understanding tasks by adding a linear classifier on top of the “[CLS]" token to predict label probabilities.”。这个意思是仅用bert的CLS token,然后直接到最终的classifier是吗?因为我看你们预训练任务中有NSP任务,所以想确认一下文本分类你们具体用的哪种方式。谢谢~

@Ag2S1
Copy link
Contributor

Ag2S1 commented Jan 11, 2022

pooled_output 就是 [CLS],参见代码

@JaheimLee
Copy link
Author

pooled_output 就是 [CLS],参见代码

他的pool操作是cls,dense,最后接具体任务的classifier。我想明确你们是否是cls直接到具体任务的classifier,中间有没有那个dense。看你们论文描述像是没有的

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