Code from BasicOptimizer.scala:75 executed in 70.31 seconds (0.916 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
IterativeTrainer.wrap(trainable)
.setOrientation(orientation())
.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = trainingMonitor.log(msg)
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(trainable, currentPoint)
}
override def onStepComplete(currentPoint: Step): Unit = {
if (0 < logEvery && (0 == currentPoint.iteration % logEvery || currentPoint.iteration < logEvery)) {
val image = currentImage
timelineAnimation += image
val caption = "Iteration " + currentPoint.iteration
out.p(caption + "\n" + out.jpg(image, caption))
}
BasicOptimizer.this.onStepComplete(trainable, currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
.setTimeout(trainingMinutes, TimeUnit.MINUTES)
.setMaxIterations(trainingIterations)
.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
.runAndFree
.asInstanceOf[lang.Double]
Reset training subject: 921846462398000
Reset training subject: 921848979161300
Adding measurement 5a051a8d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=2.0804390609264374;dx=-3.7006456981890312E-6
New Minimum: 2.0804390609264374 > 2.0804333835840225
WOLFE (weak): th(2.154434690031884)=2.0804333835840225; dx=-3.700642199631033E-6 evalInputDelta=5.677342414855957E-6
New Minimum: 2.0804333835840225 > 2.0804272145032883
WOLFE (weak): th(4.308869380063768)=2.0804272145032883; dx=-3.7005274982845586E-6 evalInputDelta=1.1846423149108887E-5
New Minimum: 2.0804272145032883 > 2.0804030299186707
WOLFE (weak): th(12.926608140191302)=2.0804030299186707; dx=-3.700468442301473E-6 evalInputDelta=3.603100776672363E-5
New Minimum: 2.0804030299186707 > 2.0802942365407944
WOLFE (weak): th(51.70643256076521)=2.0802942365407944; dx=-3.701295015805306E-6 evalInputDelta=1.4482438564300537E-4
New Minimum: 2.0802942365407944 > 2.0797139778733253
WOLFE (weak): th(258.53216280382605)=2.0797139778733253; dx=-3.698389009892434E-6 evalInputDelta=7.2508305311203E-4
New Minimum: 2.0797139778733253 > 2.076098494231701
WOLFE (weak): th(1551.1929768229563)=2.076098494231701; dx=-3.6702747779158105E-6 evalInputDelta=0.004340566694736481
New Minimum: 2.076098494231701 > 2.0509646609425545
WOLFE (weak): th(10858.350837760694)=2.0509646609425545; dx=-3.4727274601452855E-6 evalInputDelta=0.029474399983882904
New Minimum: 2.0509646609425545 > 1.8900370299816132
END: th(86866.80670208555)=1.8900370299816132; dx=-2.26350695947517E-6 evalInputDelta=0.19040203094482422
Fitness changed from 2.0804390609264374 to 1.8900370299816132
Iteration 1 complete. Error: 1.8900370299816132 Total: 29.9708; Orientation: 0.0160; Line Search: 22.6059
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b5d647f3-fb0e-4232-82ec-baebab9d37fb.jpg)
Adding measurement 1829e2c1 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=1.8900370299816132;dx=-2.19666466948423
...skipping 1832 bytes...
eration 4
<a id="p-8"></a>![Iteration 4](etc/c8562271-09cd-497a-8fd5-bd0c5dfab0ad.jpg)
Adding measurement d2f13fa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.019e+02, gradient 7.715e-04, dot -0.759; [a7c69d7d-7e9d-40a6-9486-614a730a59c3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.8900370299816132, 1.6675983369350433, 1.4459886699914932, 1.2410878241062164
LBFGS Accumulation History: 3 points
Removed measurement 1829e2c1 to history. Total: 4
th(0)=1.2410878241062164;dx=-5.951408640455957E-7
New Minimum: 1.2410878241062164 > 1.0859771966934204
END: th(1871488.617712673)=1.0859771966934204; dx=-4.893447276891111E-8 evalInputDelta=0.15511062741279602
Fitness changed from 1.2410878241062164 to 1.0859771966934204
Iteration 5 complete. Error: 1.0859771966934204 Total: 7.7376; Orientation: 0.4560; Line Search: 4.8624
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/a889c6da-d5d3-4e1e-b20d-22658c0e8d63.jpg)
Adding measurement 5ac0dc9c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.243e+03, gradient 7.375e-04, dot -0.703; [a7c69d7d-7e9d-40a6-9486-614a730a59c3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.6675983369350433, 1.4459886699914932, 1.2410878241062164, 1.0859771966934204
LBFGS Accumulation History: 3 points
Removed measurement 637cc91c to history. Total: 4
th(0)=1.0859771966934204;dx=-5.439182982516793E-7
New Minimum: 1.0859771966934204 > 0.9840033799409866
WOLF (strong): th(4032000.0000000014)=0.9840033799409866; dx=1.3384619480878071E-9 evalInputDelta=0.10197381675243378
New Minimum: 0.9840033799409866 > 0.8991171568632126
END: th(2016000.0000000007)=0.8991171568632126; dx=-3.7638904830877434E-8 evalInputDelta=0.18686003983020782
Fitness changed from 1.0859771966934204 to 0.8991171568632126
Iteration 6 complete. Error: 0.8991171568632126 Total: 10.1412; Orientation: 0.4743; Line Search: 7.2173
Final threshold in iteration 7: 0.8991171568632126 (> -Infinity) after 70.312s (< 720.000s)
0.8991171568632126