Code from BasicOptimizer.scala:88 executed in 430.01 seconds (5.724 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
val trainer = new IterativeTrainer(trainable)
trainer.setOrientation(orientation())
trainer.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = {
trainingMonitor.log(msg)
BasicOptimizer.this.log(msg)
}
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[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.addRef().asInstanceOf[Trainable], currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
trainer.setMaxIterations(trainingIterations)
trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
val result = trainer.run.asInstanceOf[lang.Double]
trainer.freeRef()
result
Reset training subject: 1605426985919
Reset training subject: 1612627794945
Adding measurement 486ae828 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=25.351940024644136;dx=-4.3880294275686944E-4
New Minimum: 25.351940024644136 > 25.349777437746525
WOLFE (weak): th(2.154434690031884)=25.349777437746525; dx=-4.580662284472964E-4 evalInputDelta=0.002162586897611618
New Minimum: 25.349777437746525 > 25.347608290612698
WOLFE (weak): th(4.308869380063768)=25.347608290612698; dx=-4.7311449891483106E-4 evalInputDelta=0.0043317340314388275
New Minimum: 25.347608290612698 > 25.338905407115817
WOLFE (weak): th(12.926608140191302)=25.338905407115817; dx=-4.71142344401557E-4 evalInputDelta=0.013034617528319359
New Minimum: 25.338905407115817 > 25.32250590622425
WOLFE (weak): th(51.70643256076521)=25.32250590622425; dx=-4.4426745686820595E-4 evalInputDelta=0.029434118419885635
New Minimum: 25.32250590622425 > 25.117691470310092
END: th(258.53216280382605)=25.117691470310092; dx=-3.7060650531516503E-4 evalInputDelta=0.23424855433404446
Fitness changed from 25.351940024644136 to 25.117691470310092
Iteration 1 complete. Error: 25.117691470310092 Total: 64.8707; Orientation: 0.0440; Line Search: 42.5945
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 67a043a6 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=25.117691470310092;dx=-3.4283697718429616E-4
New Minimum: 25.117691470310092 > 24.77485477179289
WOLFE (weak): th(556.9906600335335)=24.77485477179289; dx=-3.396448222679104E-4 evalInputDelta=0.34283669851720333
New Minimum: 24.77485477179289 > 24.392319597303867
END: th(1113.981320067067)=24.392319597303867; dx=-2.857680807909096E-4 evalInputDelta=0.7253718730062246
Fitness changed from 25.117691470310092 to 24.392319597303867
Iteration 2 complete. Error: 24.392319597303867 Total: 28.8525; Orientation: 0.0072; Line Search: 21.8367
<a id="p-5"></a>Iteration 2
<a id="p-4"></a
...skipping 9501 bytes...
ine Search: 21.9205
Adding measurement 7cfbbfa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.540e+02, gradient 2.304e-03, dot -0.319; [577cfa74-3a3d-433e-99e0-2464ccb80908 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7.690873548388481, 24.392319597303867, 25.117691470310092, 25.351940024644136
LBFGS Accumulation History: 3 points
Removed measurement 7cfbbfa to history. Total: 3
th(0)=7.690873548388481;dx=-5.237757307327127E-6
New Minimum: 7.690873548388481 > 7.451432332396507
WOLF (strong): th(116039.72084031955)=7.451432332396507; dx=1.8418414694356774E-6 evalInputDelta=0.23944121599197388
New Minimum: 7.451432332396507 > 7.28471052646637
END: th(58019.86042015978)=7.28471052646637; dx=-1.3044928067262493E-7 evalInputDelta=0.4061630219221115
Fitness changed from 7.690873548388481 to 7.28471052646637
Iteration 14 complete. Error: 7.28471052646637 Total: 27.9795; Orientation: 0.0777; Line Search: 20.8632
Adding measurement 446d194f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.705e+02, gradient 1.595e-03, dot -0.473; [577cfa74-3a3d-433e-99e0-2464ccb80908 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7.28471052646637, 24.392319597303867, 25.117691470310092, 25.351940024644136
LBFGS Accumulation History: 3 points
Removed measurement 446d194f to history. Total: 3
th(0)=7.28471052646637;dx=-2.455617881383992E-6
New Minimum: 7.28471052646637 > 6.882365018129349
WOLF (strong): th(125000.00000000009)=6.882365018129349; dx=1.3323047119987886E-8 evalInputDelta=0.4023455083370209
END: th(62500.000000000044)=6.97064133733511; dx=-6.78948154761952E-7 evalInputDelta=0.3140691891312599
Fitness changed from 7.28471052646637 to 6.882365018129349
Iteration 15 complete. Error: 6.882365018129349 Total: 28.3924; Orientation: 0.1120; Line Search: 21.1134
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>
Final threshold in iteration 16: 6.882365018129349 (> -Infinity) after 429.988s (< 3600.000s)
6.882365018129349