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

关于MDFEND这个baseline模型实现的一些问题 #5

Open
hiccgoal opened this issue Mar 24, 2023 · 1 comment
Open

关于MDFEND这个baseline模型实现的一些问题 #5

hiccgoal opened this issue Mar 24, 2023 · 1 comment

Comments

@hiccgoal
Copy link

feature, _ = self.attention(init_feature, masks)

你好,这里对bert编码后的文本进行self.attention得到了句子表示,按照MDFEND模型,这个句子表示要和domain_embedding聚合,然后再输入到第55行的self.gate,进而得到gate_value.
但这里的编程实现好像直接仅仅把domain_embedding输入到了gate中.
关于模型参考了这篇文章(https://mp.weixin.qq.com/s/_nU0TQewz4u7a20lspNN9A)

@easezyc
Copy link
Collaborator

easezyc commented Apr 6, 2023

嗯,你指出的是对的,估计是做消融实验的时候改错文件了,不过对结果没影响,结果都是从MDFEND原文里粘贴过来的。

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