コード例 #1
0
ファイル: lbfgs.go プロジェクト: btracey/gofunopter
func NewLbfgs() *Lbfgs {
	l := &Lbfgs{
		//step: &uni.Step{},

		LinesearchMethod:   univariate.NewCubic(),
		LinesearchSettings: univariate.DefaultGradSettings,
		NumStore:           30,
		Wolfe:              &linesearch.StrongWolfeConditions{FunConst: 0, GradConst: 0.9},
	}
	l.LinesearchSettings.MaximumFunctionEvaluations = 100
	l.LinesearchSettings.Display = false
	l.LinesearchSettings.Gradient.AbsoluteTolerance = 0 // Force convergence from wolfe conditions
	return l
}
コード例 #2
0
ファイル: lbfgs.go プロジェクト: kortschak/gofunopter
func NewLbfgs() *Lbfgs {
	l := &Lbfgs{
		step: uni.NewBoundedStep(),

		LinesearchMethod:   univariate.NewCubic(),
		LinesearchSettings: univariate.NewUniGradSettings(),
		NumStore:           30,
		Wolfe:              &linesearch.StrongWolfeConditions{},
	}
	l.Wolfe.SetFunConst(0)
	l.Wolfe.SetGradConst(0.9)
	l.LinesearchSettings.MaximumFunctionEvaluations = 100
	l.LinesearchSettings.Display = false
	l.LinesearchSettings.GradientAbsoluteTolerance = 0 // Force convergence from wolfe conditions
	return l
}