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

A potential typo/bug in averaging s_test? #19

Open
zlin7 opened this issue Oct 14, 2020 · 2 comments
Open

A potential typo/bug in averaging s_test? #19

zlin7 opened this issue Oct 14, 2020 · 2 comments

Comments

@zlin7
Copy link

zlin7 commented Oct 14, 2020

In calc_s_test_single, it seems like the intended operation is to add all the sampled s_test_i together and divide the sum by r. However, it is actually extending the list. Because of this, it seems like when I set r>1, calc_influence_single just completely skips s_test_vec[len(grad_z_vec):]. Am I not understanding what this is doing correctly, or is this a typo? I'm quite unsure because this looks like something intentional, as it's explicitly converted to a list of tensors.

@fjzpcmj
Copy link

fjzpcmj commented Aug 1, 2021

I think it is a bug. The code only uses the first s_test to calculate influence even when r>1.

@mkirchhof
Copy link

Just verified and you are right. Gradients are appended instead of added. Fixed this in my repo in this commit a959de6

I can create a pull request for if @nimarb would like to merge it.

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