-
Notifications
You must be signed in to change notification settings - Fork 71
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 gradient of h_estimate for compute hv #5
Comments
Hey @peizhaoli05 , I edited my last issue but it was already closed so I guess it isn't very public. I actually do keep the
with certain break conditions (after like 5000 samples, I break from the loop, but the above code is a bit simplified because what I'm doing is not super straightforward) As to your specific question, could we detach |
Hi @andrewsilva9 , Thanks for your reply. Actually I assume that put |
If you leave it as |
Okay @peizhaoli05, I looked back at the original implementation and I see here: https://github.com/kohpangwei/influence-release/blob/578bc458b4d7cc39ed7343b9b271a04b60c782b1/influence/hessians.py#L50
|
Hey, thanks a lot for the input. Unfortunately, I'm currently busy with exams and look into it in more depth at the end of Feb. |
Thanks for the great code.
I change the loss function into binary cross entropy but it runs really slow when the
recursion_depth
rises. Is it reasonable to useh_estimate.detach()
before we puth_estimate
intohv = hvp(loss, list(model.parameters()), h_estimate)
? Since we should't incorporate the gradient ofh_estimate
in terms ofw
in functionhvp
.I am not sure about it and appreciated it if you can take a look. Thank you.
The text was updated successfully, but these errors were encountered: