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

Initialization of conjugate gradient in competitive_optimizer #255

Open
f-t-s opened this issue May 12, 2020 · 1 comment
Open

Initialization of conjugate gradient in competitive_optimizer #255

f-t-s opened this issue May 12, 2020 · 1 comment
Assignees

Comments

@f-t-s
Copy link

f-t-s commented May 12, 2020

Hi,

I saw that you have implemented competitive gradient descent in your dev-branch, thanks for giving it a try @mikkel !
I just wanted to mention that you seem to have a bug that we also found in our pytorch implementation recently, and will correct shortly.

In the definition of mgeneral_conjugate_gradient you initialize the residual with

r = [tf.identity(_b) for _b in b]

This is correct if the initial guess is zero, otherwise (if A is the matrix to be inverted), it should be
r = b - Ax_0

where x_0 is the initial guess, see also here

Initializing the residual wrongly can lead to different results and we found that there are cases where this bug breaks cgd, while the fixed version performs well.

@martyn
Copy link
Contributor

martyn commented Jul 30, 2020

Sorry for missing this. Conjugate gradient is awesome, thank you for your work! We've rewritten hypergan in pytorch and are working to re-add conjugate gradient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants