optim
optim copied to clipboard
cg: modify search direction
CG converges in two steps for Booth function with the modified search direction.
The pull request includes the followings:
- use search direction updated by cg_update().
- use the first step size scaled by gradient norm rather than 1.