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

The sign #16

Open
Airuibadi opened this issue Jul 17, 2020 · 0 comments
Open

The sign #16

Airuibadi opened this issue Jul 17, 2020 · 0 comments

Comments

@Airuibadi
Copy link

tmp_influence = -sum(
[
###################################
# TODO: verify if computation really needs to be done
# on the CPU or if GPU would work, too
###################################
torch.sum(k * j).data.cpu().numpy()
for k, j in zip(grad_z_vecs[i], e_s_test)
###################################
# Originally with [i] because each grad_z contained
# a list of tensors as long as e_s_test list
# There is one grad_z per training data sample
###################################
]) / train_dataset_size

In the final step, the code here accually calculate the -1/n·I_up,loss(z,z_test). However, in the equation(2) of the original paperhttps://arxiv.org/abs/1703.04730, the term I_up,loss(z,z_test) do has a minus sign. So two negatives make a positive, the calculating here should be 1/n·I_up,loss(z,z_test). Or I just misunderstand some part of code or paper?

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

1 participant