BasicOptimizer.scala:89 executed in 94.85 seconds (0.914 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: 285095300877900
Reset training subject: 285097211379500
Adding measurement 6480f0ad to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-57.007163437718084;dx=-5.545100770468271E-6
New Minimum: -57.007163437718084 > -57.007173300687064
END: th(2.154434690031884)=-57.007173300687064; dx=-3.5825804683224346E-6 evalInputDelta=9.862968980201003E-6
Fitness changed from -57.007163437718084 to -57.007173300687064
Iteration 1 complete. Error: -57.007173300687064 Total: 9.5756; Orientation: 0.0617; Line Search: 3.6725
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3a61290c-d20f-4e08-9513-8466ff02af73.jpg)
Adding measurement 2883026c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-57.007173300687064;dx=-3.5825614540789722E-6
New Minimum: -57.007173300687064 > -57.0071930266199
WOLFE (weak): th(4.641588833612779)=-57.0071930266199; dx=-3.5825499661354327E-6 evalInputDelta=1.9725932837388882E-5
New Minimum: -57.0071930266199 > -57.00720946489205
WOLFE (weak): th(9.283177667225559)=-57.00720946489205; dx=-3.5825408052253697E-6 evalInputDelta=3.61642049853117E-5
New Minimum: -57.00720946489205 > -57.00727193028299
WOLFE (weak): th(27.849533001676676)=-57.00727193028299; dx=-3.582529550794771E-6 evalInputDelta=9.862959592510379E-5
New Minimum: -57.00727193028299 > -57.00757439331314
WOLFE (weak): th(111.3981320067067)=-57.00757439331314; dx=-3.582470296579133E-6 evalInputDelta=4.0109262607757046E-4
New Minimum: -57.00757439331314 > -57.00916887297623
WOLFE (weak): th(556.9906600335335)=-57.00916887297623; dx=-3.582259418625138E-6 evalInputDelta=0.001995572289168024
New Minimum: -57.00916887297623 > -57.01914239983214
WOLFE (weak): th(3341.9439602012008)=-57.01914239983214; dx=-3.580868038298239E-6 evalInputDelta=0.011969099145076711
New Minimum: -57.01914239983214 > -57.090881319167345
WOLFE (weak): th(23393.607721408407)=-57.090881319167345; dx=-3.573926539671516E-6 evalInputDelta=0.08370801848028009
New Minimum: -57.090881319167345 > -57.67063765080456
WOLFE (weak): th(187148.86177126726)=-57.67063765080456; dx=-3.5092554058435317E-6 evalInputDelta=0.6634643501174935
New Minimum: -57.67063765080456 > -62.443549857635055
END: th(1684339.7559414054)=-62.443549857635055; dx=-2.8482582426992874E-6 evalInputDelta=5.436376556947991
Fitness changed from -57.007173300687064 to -62.443549857635055
Iteration 2 complete. Error: -62.443549857635055 Total: 21.3529; Orientation: 0.0593; Line Search: 19.1410
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b56ec768-c061-487b-b197-9545663a3a28.jpg)
Adding measurement 77897a4 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-62.443549857635055;dx=-2.5554447351534793E-6
New Minimum: -62.443549857635055 > -69.98109557653538
END: th(3628800.0000000005)=-69.98109557653538; dx=-1.5857384836040428E-6 evalInputDelta=7.537545718900326
Fitness changed from -62.443549857635055 to -69.98109557653538
Iteration 3 complete. Error: -69.98109557653538 Total: 6.0035; Orientation: 0.0560; Line Search: 3.7027
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/7ac12290-6879-4d33-8680-bc452234daa7.jpg)
Adding measurement 12a752a2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.882e+03, gradient 1.233e-03, dot -0.769; [41ed09de-8640-4a4f-9370-1729ae0172c2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.98109557653538, -62.443549857635055, -57.007173300687064, -57.007163437718084
LBFGS Accumulation History: 3 points
Removed measurement 12a752a2 to history. Total: 3
th(0)=-69.98109557653538;dx=-1.520176251465258E-6
New Minimum: -69.98109557653538 > -78.52886242086647
END: th(7818012.603187701)=-78.52886242086647; dx=-7.115982072549009E-7 evalInputDelta=8.547766844331093
Fitness changed from -69.98109557653538 to -78.52886242086647
Iteration 4 complete. Error: -78.52886242086647 Total: 7.2133; Orientation: 1.0132; Line Search: 4.0500
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/dc22a9f1-04c1-46b4-becf-f9496f9d9a7e.jpg)
Adding measurement 1338b5bb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.227e+03, gradient 1.046e-03, dot -0.544; [41ed09de-8640-4a4f-9370-1729ae0172c2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.52886242086647, -62.443549857635055, -57.007173300687064, -57.007163437718084
LBFGS Accumulation History: 3 points
Removed measurement 1338b5bb to history. Total: 3
th(0)=-78.52886242086647;dx=-1.0939322080248403E-6
New Minimum: -78.52886242086647 > -85.88452055963215
END: th(1.6843397559414055E7)=-85.88452055963215; dx=-8.032181346472819E-8 evalInputDelta=7.355658138765676
Fitness changed from -78.52886242086647 to -85.88452055963215
Iteration 5 complete. Error: -85.88452055963215 Total: 6.9442; Orientation: 1.0193; Line Search: 3.7378
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/44170fab-6f7f-4b1a-a2fd-bc01db00a831.jpg)
Adding measurement 1150293e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.148e+03, gradient 1.270e-03, dot -0.226; [41ed09de-8640-4a4f-9370-1729ae0172c2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -85.88452055963215, -62.443549857635055, -57.007173300687064, -57.007163437718084
LBFGS Accumulation History: 3 points
Removed measurement 1150293e to history. Total: 3
th(0)=-85.88452055963215;dx=-1.6124926171148615E-6
Armijo: th(3.628800000000001E7)=-79.6739708681636; dx=4.1874078704815006E-7 evalInputDelta=-6.210549691468557
New Minimum: -85.88452055963215 > -88.85061807500175
WOLF (strong): th(1.8144000000000004E7)=-88.85061807500175; dx=5.497355784097921E-7 evalInputDelta=2.966097515369597
New Minimum: -88.85061807500175 > -92.11218880338309
END: th(6048000.000000001)=-92.11218880338309; dx=-3.9639741196609704E-7 evalInputDelta=6.227668243750941
Fitness changed from -85.88452055963215 to -92.11218880338309
Iteration 6 complete. Error: -92.11218880338309 Total: 10.8383; Orientation: 0.9523; Line Search: 7.6747
Adding measurement 63c102ea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.613e+04, gradient 8.593e-04, dot -0.503; [41ed09de-8640-4a4f-9370-1729ae0172c2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -92.11218880338309, -62.443549857635055, -57.007173300687064, -57.007163437718084
LBFGS Accumulation History: 3 points
Removed measurement 63c102ea to history. Total: 3
th(0)=-92.11218880338309;dx=-7.383119713293172E-7
New Minimum: -92.11218880338309 > -96.7020516974367
END: th(1.3030021005312836E7)=-96.7020516974367; dx=-7.285113211792726E-8 evalInputDelta=4.58986289405361
Fitness changed from -92.11218880338309 to -96.7020516974367
Iteration 7 complete. Error: -96.7020516974367 Total: 6.6752; Orientation: 0.9506; Line Search: 3.7445
Adding measurement 55585112 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.832e+04, gradient 1.028e-03, dot -0.364; [41ed09de-8640-4a4f-9370-1729ae0172c2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -96.7020516974367, -62.443549857635055, -57.007173300687064, -57.007163437718084
LBFGS Accumulation History: 3 points
Removed measurement 55585112 to history. Total: 3
th(0)=-96.7020516974367;dx=-1.0577850802651157E-6
Armijo: th(2.8072329265690096E7)=-94.33607893092565; dx=3.326170173732632E-7 evalInputDelta=-2.3659727665110495
New Minimum: -96.7020516974367 > -99.38089367144129
WOLF (strong): th(1.4036164632845048E7)=-99.38089367144129; dx=3.3512810466324137E-7 evalInputDelta=2.678841974004584
New Minimum: -99.38089367144129 > -100.18901345518587
END: th(4678721.544281683)=-100.18901345518587; dx=-3.957287031845347E-7 evalInputDelta=3.486961757749171
Fitness changed from -96.7020516974367 to -100.18901345518587
Iteration 8 complete. Error: -100.18901345518587 Total: 10.5867; Orientation: 1.0378; Line Search: 7.7847
Adding measurement 703a6c5b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.411e+04, gradient 6.893e-04, dot -0.620; [41ed09de-8640-4a4f-9370-1729ae0172c2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -100.18901345518587, -62.443549857635055, -57.007173300687064, -57.007163437718084
LBFGS Accumulation History: 3 points
Removed measurement 703a6c5b to history. Total: 3
th(0)=-100.18901345518587;dx=-4.7517293331939123E-7
New Minimum: -100.18901345518587 > -103.63116743975549
END: th(1.0080000000000004E7)=-103.63116743975549; dx=-2.3139544503233732E-7 evalInputDelta=3.4421539845696145
Fitness changed from -100.18901345518587 to -103.63116743975549
Iteration 9 complete. Error: -103.63116743975549 Total: 6.6629; Orientation: 0.9482; Line Search: 3.7369
Adding measurement 7a4f392 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.596e+04, gradient 7.422e-04, dot -0.535; [41ed09de-8640-4a4f-9370-1729ae0172c2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -103.63116743975549, -62.443549857635055, -57.007173300687064, -57.007163437718084
LBFGS Accumulation History: 3 points
Removed measurement 7a4f392 to history. Total: 3
th(0)=-103.63116743975549;dx=-5.508341100278877E-7
New Minimum: -103.63116743975549 > -106.16969891573676
WOLF (strong): th(2.1716701675521396E7)=-106.16969891573676; dx=6.581452703660709E-8 evalInputDelta=2.538531475981273
New Minimum: -106.16969891573676 > -106.3923893288962
END: th(1.0858350837760698E7)=-106.3923893288962; dx=-5.186013762565017E-8 evalInputDelta=2.761221889140714
Fitness changed from -103.63116743975549 to -106.3923893288962
Iteration 10 complete. Error: -106.3923893288962 Total: 8.6868; Orientation: 1.0232; Line Search: 5.8661
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/7ee4ce70-1c7a-4c81-991d-1bf7b0c1a45e.jpg)
Final threshold in iteration 11: -106.3923893288962 (> -Infinity) after 94.848s (< 5400.000s)
Returns
-106.3923893288962