tmp update
This commit is contained in:
parent
e3f737fbc0
commit
9d31decd84
@ -651,8 +651,10 @@ int lbfgs(
|
||||
|
||||
veccpy(d, dp, n);
|
||||
} else if (ys < yy) {
|
||||
// 这里假设了初始的Hessian矩阵为单位阵乘以ys/yy
|
||||
vecscale(d, ys / yy, n); // 适当缩放d的大小
|
||||
} else {
|
||||
// 假设初始的Hessian矩阵为 I + [(ys - yy)/tr(Yk)]diag(y2)
|
||||
veccpy(y2, lm[end].y, n);
|
||||
vecmul(y2, lm[end].y, n);
|
||||
vecdot(&Yk, y2, y2, n);
|
||||
|
@ -187,7 +187,7 @@ int TEST_FUNC::Routine()
|
||||
lbfgs_parameter_init(&self_para);
|
||||
self_para.epsilon = 1e-7;
|
||||
|
||||
int ret = lbfgs(N, x, &fx, _Func, _Progress, this, &self_para, NULL);
|
||||
int ret = lbfgs(N, x, &fx, _Func, _Progress, this, &self_para, _Precondition);
|
||||
|
||||
clog << endl << "L-BFGS optimization terminated with status: " << lbfgs_strerror(ret) << endl;
|
||||
clog << "Maximal difference = " << max_diff(x, m, N) << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user