CG method implementation

32 views
Skip to first unread message

Hiroyuki Kasai

unread,
Oct 10, 2014, 4:15:13 AM10/10/14
to manopt...@googlegroups.com
Dear all,

Reading the code of CG solver (conjugategradient.m), I found the code below;

            Pnewgrad = newgrad;
            newgradPnewgrad = inner_product(newgrad, Pnewgrad);  

From seeing the entire code, I cannot understand that why "Pnewgrad" is needed.

It would be appreciated to tell me the purpose of this "Pnewgrad"  variable.

Regards,

Hiro

BM

unread,
Oct 10, 2014, 6:25:55 AM10/10/14
to manopt...@googlegroups.com
Hello Hiro,

Which version are you using? In the current version, this line is not there. Could you verify it again?

Cheers,
BM

Hiroyuki Kasai

unread,
Oct 10, 2014, 7:01:42 AM10/10/14
to manopt...@googlegroups.com
Hello Bamdev,

This is completely my mistake. I am sorry for that.

Now, I understood that when no preconditioner provided, Pnewgrad is the same as newgrad.
Is this correct?

Regards,

Hiro

Nicolas Boumal

unread,
Oct 10, 2014, 7:33:50 AM10/10/14
to manopt...@googlegroups.com
Hello Hiro,

That is right: if you specify no preconditioner, than the preconditioner is the identity map, so that Pnewgrad = newgrad.

Best,
Nicolas
Reply all
Reply to author
Forward
0 new messages