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

attention score计算的疑问 #27

Open
wangyuehu opened this issue Dec 14, 2020 · 2 comments
Open

attention score计算的疑问 #27

wangyuehu opened this issue Dec 14, 2020 · 2 comments

Comments

@wangyuehu
Copy link

请问代码relative_transformer.py种127行的E_如何理解,看了论文中在计算attention score时似乎没有这一项?

@yhcc
Copy link
Member

yhcc commented Dec 20, 2020

嗯,论文中没有这一项。我们经验性的发现这一项可以让训练效果更加稳定,所以就在新版的代码中添加了这一项。可以理解为需要知道当前key和query的相对位置来决定对这个key的bias。

@iamqiz
Copy link

iamqiz commented Mar 10, 2022

原来是这样啊,我看了半天,幸好跑来github看到了这个issue > <

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

3 participants