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

Computation of beta_k in CG in exp2 #4

Open
NaHenn opened this issue Oct 24, 2024 · 0 comments
Open

Computation of beta_k in CG in exp2 #4

NaHenn opened this issue Oct 24, 2024 · 0 comments

Comments

@NaHenn
Copy link

NaHenn commented Oct 24, 2024

Hello,
thank you very much for providing this code. I found it very useful.
I just wondered, whether the computation of beta_k in the cg algorithm in the update step of CGD in the second experiment contains a typo:
I think the line
denom += torch.dot(r_kplus1_i, r_kplus1_i)
should be altered to
num += torch.dot(r_kplus1_i, r_kplus1_i).
In the original computation the numerator num is 0 as far as I understand it.
Best wishes

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