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

mark_idx setting #5

Open
HuizhenShu opened this issue Jul 5, 2021 · 2 comments
Open

mark_idx setting #5

HuizhenShu opened this issue Jul 5, 2021 · 2 comments

Comments

@HuizhenShu
Copy link

在情感预测模型中,prefix是“很满意。”,候选答案是“很”和“不”,目前mark_idx是1,这样的话mask后的句子输入是“很[MASK]意”+text,这样看起来挖空的位置没什么实际含义。请问是我理解有什么不对吗,为什么不将mark_idx设为0呢?

@HuizhenShu
Copy link
Author

另外我感觉,如果将prefix设为“满意。”,候选答案不变。mark_idx=0。当label不为2时,用insert将[mask]插入source,将候选答案插入target比较合适。

@yc1999
Copy link

yc1999 commented Jul 26, 2021

在情感预测模型中,prefix是“很满意。”,候选答案是“很”和“不”,目前mark_idx是1,这样的话mask后的句子输入是“很[MASK]意”+text,这样看起来挖空的位置没什么实际含义。请问是我理解有什么不对吗,为什么不将mark_idx设为0呢?

你好,根据我的理解,你没有考虑到BERT输入时,句子前面会有一个[CLS]哦。这个mark_idx是考虑了CLS之后的idx~即[CLS]很满意。

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