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

Question about loss function #11

Open
Geeks-Z opened this issue Jun 29, 2023 · 1 comment
Open

Question about loss function #11

Geeks-Z opened this issue Jun 29, 2023 · 1 comment

Comments

@Geeks-Z
Copy link

Geeks-Z commented Jun 29, 2023

In engine.py line 68
loss = loss - args.pull_constraint_coeff * output['reduce_sim']
In the paper is
loss = loss + args.pull_constraint_coeff * output['reduce_sim']?

@prachigarg23
Copy link

Hi @Geeks-Z , I believe this is a typing error in the paper because the objective is to ' pull selected keys closer to corresponding query features' by maximising the cosine similarity of top_k selected keys. Hence, the minus sign in the code should be correct.

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