You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think p_new should be calculated based on r_new instead of r here. In the Wikipedia version (https://en.wikipedia.org/wiki/Conjugate_gradient_method) the corresponding formula is $p_{k+1} = r_{k+1} + \beta_k p_k$ with $r_{k+1}$ corresponding to r_new.
The text was updated successfully, but these errors were encountered:
Thanks for your interest and pointing out the error in my code. I think you are right, and thus I fixed the code to use r_new instead of r. When I ran several benchmarks with both r and r_new, I didn't experience any noticeable performance differences, and hope your experiments also didn't get affected by this bug. Let me know if you have other concerns.
betty/betty/hypergradient/cg.py
Line 53 in 39457e1
I think$p_{k+1} = r_{k+1} + \beta_k p_k$ with $r_{k+1}$ corresponding to
p_new
should be calculated based onr_new
instead ofr
here. In the Wikipedia version (https://en.wikipedia.org/wiki/Conjugate_gradient_method) the corresponding formula isr_new
.The text was updated successfully, but these errors were encountered: