Code from BasicOptimizer.scala:88 executed in 128.64 seconds (2.579 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: 679325829110
Reset training subject: 682697382724
Adding measurement 28563cd3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=27.79643873171881;dx=-2.1782818563999307E-5
New Minimum: 27.79643873171881 > 27.79633406130597
END: th(2.154434690031884)=27.79633406130597; dx=-1.8856439857553484E-5 evalInputDelta=1.0467041283845901E-4
Fitness changed from 27.79643873171881 to 27.79633406130597
Iteration 1 complete. Error: 27.79633406130597 Total: 16.1612; Orientation: 0.0336; Line Search: 6.3464
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0f996c3a-433e-462a-9c6f-bf606f7e5b57.jpg)
Adding measurement 29b55d28 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=27.79633406130597;dx=-2.0566987650907604E-5
New Minimum: 27.79633406130597 > 27.79610067536123
WOLFE (weak): th(4.641588833612779)=27.79610067536123; dx=-2.2183518534905532E-5 evalInputDelta=2.333859447389841E-4
New Minimum: 27.79610067536123 > 27.79586656833999
WOLFE (weak): th(9.283177667225559)=27.79586656833999; dx=-2.1166346049302847E-5 evalInputDelta=4.6749296598136425E-4
New Minimum: 27.79586656833999 > 27.794949556235224
WOLFE (weak): th(27.849533001676676)=27.794949556235224; dx=-1.958516736592457E-5 evalInputDelta=0.001384505070745945
New Minimum: 27.794949556235224 > 27.79091557348147
WOLFE (weak): th(111.3981320067067)=27.79091557348147; dx=-2.1318824891701964E-5 evalInputDelta=0.005418487824499607
New Minimum: 27.79091557348147 > 27.775783931836486
WOLFE (weak): th(556.9906600335335)=27.775783931836486; dx=-2.0245504732106245E-5 evalInputDelta=0.02055012946948409
New Minimum: 27.775783931836486 > 27.670301608275622
WOLFE (weak): th(3341.9439602012008)=27.670301608275622; dx=-2.1215429310190516E-5 evalInputDelta=0.12603245303034782
New Minimum: 27.670301608275622 > 26.779215505812317
END: th(23393.607721408407)=26.779215505812317; dx=-1.5200733925249903E-5 evalInputDelta=1.0171185554936528
Fitness changed from 27.79633406130597 to 26.7792
...skipping 4756 bytes...
47664570808 to 9.299026668071747
Iteration 8 complete. Error: 9.299026668071747 Total: 10.4219; Orientation: 0.3590; Line Search: 6.3857
Adding measurement 6df63965 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.224e+03, gradient 9.990e-04, dot -0.272; [0c091c4f-f36b-4c32-b9d0-551a83befee5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 9.299026668071747, 26.779215505812317, 27.79633406130597, 27.79643873171881
LBFGS Accumulation History: 3 points
Removed measurement 6df63965 to history. Total: 3
th(0)=9.299026668071747;dx=-8.826436915789948E-7
New Minimum: 9.299026668071747 > 8.101187236607075
WOLF (strong): th(5040000.000000002)=8.101187236607075; dx=3.801250563242903E-8 evalInputDelta=1.197839431464672
New Minimum: 8.101187236607075 > 7.004341766238213
END: th(2520000.000000001)=7.004341766238213; dx=-1.5724016842131532E-7 evalInputDelta=2.2946849018335342
Fitness changed from 9.299026668071747 to 7.004341766238213
Iteration 9 complete. Error: 7.004341766238213 Total: 12.7999; Orientation: 0.1540; Line Search: 9.5034
Adding measurement 4258b87a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.235e+03, gradient 7.112e-04, dot -0.296; [0c091c4f-f36b-4c32-b9d0-551a83befee5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7.004341766238213, 26.779215505812317, 27.79633406130597, 27.79643873171881
LBFGS Accumulation History: 3 points
Removed measurement 4258b87a to history. Total: 3
th(0)=7.004341766238213;dx=-4.317421475010019E-7
New Minimum: 7.004341766238213 > 5.357620790600777
END: th(5429175.418880349)=5.357620790600777; dx=-4.084683432363133E-8 evalInputDelta=1.646720975637436
Fitness changed from 7.004341766238213 to 5.357620790600777
Iteration 10 complete. Error: 5.357620790600777 Total: 10.2510; Orientation: 0.2384; Line Search: 6.9436
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/55f894e3-7bae-4137-a067-03e0a76e5507.jpg)
Final threshold in iteration 11: 5.357620790600777 (> -Infinity) after 128.619s (< 1800.000s)
5.357620790600777