BasicOptimizer.scala:89 executed in 211.06 seconds (1.953 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: 18121215777719
Reset training subject: 18125416783832
Adding measurement 49f11e0b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.6056914776563644;dx=-6.928375394138064E-7
New Minimum: -0.6056914776563644 > -0.6056919544935226
END: th(2.154434690031884)=-0.6056919544935226; dx=-5.824949009638179E-7 evalInputDelta=4.76837158203125E-7
Fitness changed from -0.6056914776563644 to -0.6056919544935226
Iteration 1 complete. Error: -0.6056919544935226 Total: 20.9146; Orientation: 0.0445; Line Search: 8.1386
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6c1d6adf-107c-4dbd-8498-d0b7c70db823.jpg)
Adding measurement 84d5c28 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.6056919544935226;dx=-5.824921353618255E-7
New Minimum: -0.6056919544935226 > -0.605693444609642
WOLFE (weak): th(4.641588833612779)=-0.605693444609642; dx=-5.824805460198581E-7 evalInputDelta=1.4901161193847656E-6
New Minimum: -0.605693444609642 > -0.6056948453187943
WOLFE (weak): th(9.283177667225559)=-0.6056948453187943; dx=-5.824725358294718E-7 evalInputDelta=2.8908252716064453E-6
New Minimum: -0.6056948453187943 > -0.605700209736824
WOLFE (weak): th(27.849533001676676)=-0.605700209736824; dx=-5.824611973584102E-7 evalInputDelta=8.255243301391602E-6
New Minimum: -0.605700209736824 > -0.60572449862957
WOLFE (weak): th(111.3981320067067)=-0.60572449862957; dx=-5.824316989161004E-7 evalInputDelta=3.254413604736328E-5
New Minimum: -0.60572449862957 > -0.605854332447052
WOLFE (weak): th(556.9906600335335)=-0.605854332447052; dx=-5.823320853975076E-7 evalInputDelta=1.623779535293579E-4
New Minimum: -0.605854332447052 > -0.606664851307869
WOLFE (weak): th(3341.9439602012008)=-0.606664851307869; dx=-5.817991607880083E-7 evalInputDelta=9.728968143463135E-4
New Minimum: -0.606664851307869 > -0.6124767512083054
WOLFE (weak): th(23393.607721408407)=-0.6124767512083054; dx=-5.776647352413111E-7 evalInputDelta=0.006784796714782715
New Minimum: -0.6124767512083054 > -0.658329039812088
WOLFE (weak): th(187148.86177126726)=-0.658329039812088; dx=-5.424465581190996E-7 evalInputDelta=0.05263708531856537
New Minimum: -0.658329039812088 > -0.9453887641429901
END: th(1684339.7559414054)=-0.9453887641429901; dx=-2.534552890524813E-7 evalInputDelta=0.33969680964946747
Fitness changed from -0.6056919544935226 to -0.9453887641429901
Iteration 2 complete. Error: -0.9453887641429901 Total: 48.2305; Orientation: 0.0487; Line Search: 43.5826
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/7ca336e6-4ee1-4982-83c8-f99f4abe84c6.jpg)
Adding measurement 33d7c0f4 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.9453887641429901;dx=-2.628916943909604E-7
New Minimum: -0.9453887641429901 > -1.253660500049591
END: th(3628800.0000000005)=-1.253660500049591; dx=-1.0718738666361228E-7 evalInputDelta=0.30827173590660095
Fitness changed from -0.9453887641429901 to -1.253660500049591
Iteration 3 complete. Error: -1.253660500049591 Total: 13.1542; Orientation: 0.0453; Line Search: 8.9846
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/7607c2b6-6221-43fd-ae34-1d0442079763.jpg)
Adding measurement 34e6c16a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.830e+03, gradient 3.801e-04, dot -0.592; [54eaf0bc-6b8c-40aa-ba3c-710b5748c79f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.253660500049591, -0.9453887641429901, -0.6056919544935226, -0.6056914776563644
LBFGS Accumulation History: 3 points
Removed measurement 34e6c16a to history. Total: 3
th(0)=-1.253660500049591;dx=-1.4444425212954816E-7
New Minimum: -1.253660500049591 > -1.5357473567128181
END: th(7818012.603187701)=-1.5357473567128181; dx=-3.008222209636928E-8 evalInputDelta=0.2820868566632271
Fitness changed from -1.253660500049591 to -1.5357473567128181
Iteration 4 complete. Error: -1.5357473567128181 Total: 14.2709; Orientation: 1.0235; Line Search: 8.7996
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/058c9b29-e884-4f05-a2a9-55511a63c2c5.jpg)
Adding measurement 44d8abb0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.589e+03, gradient 3.371e-04, dot -0.372; [54eaf0bc-6b8c-40aa-ba3c-710b5748c79f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5357473567128181, -0.9453887641429901, -0.6056919544935226, -0.6056914776563644
LBFGS Accumulation History: 3 points
Removed measurement 44d8abb0 to history. Total: 3
th(0)=-1.5357473567128181;dx=-1.1361331330363861E-7
New Minimum: -1.5357473567128181 > -1.6698245704174042
WOLF (strong): th(1.6843397559414055E7)=-1.6698245704174042; dx=1.70697370119987E-8 evalInputDelta=0.13407721370458603
New Minimum: -1.6698245704174042 > -1.7139098569750786
END: th(8421698.779707028)=-1.7139098569750786; dx=-1.1721407949935711E-9 evalInputDelta=0.17816250026226044
Fitness changed from -1.5357473567128181 to -1.7139098569750786
Iteration 5 complete. Error: -1.7139098569750786 Total: 18.6663; Orientation: 1.0053; Line Search: 13.3848
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/35c99e12-a827-47c7-9a59-fe5f5bcf05fa.jpg)
Adding measurement 7dad810e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.810e+03, gradient 2.958e-04, dot -0.327; [54eaf0bc-6b8c-40aa-ba3c-710b5748c79f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7139098569750786, -0.9453887641429901, -0.6056919544935226, -0.6056914776563644
LBFGS Accumulation History: 3 points
Removed measurement 7dad810e to history. Total: 3
th(0)=-1.7139098569750786;dx=-8.74891798531059E-8
New Minimum: -1.7139098569750786 > -1.7501752823591232
WOLF (strong): th(1.8144000000000004E7)=-1.7501752823591232; dx=3.170596265801511E-8 evalInputDelta=0.03626542538404465
New Minimum: -1.7501752823591232 > -1.8591570779681206
WOLF (strong): th(9072000.000000002)=-1.8591570779681206; dx=6.876516067633234E-9 evalInputDelta=0.145247220993042
END: th(3024000.0000000005)=-1.8100889399647713; dx=-4.1820968129547354E-8 evalInputDelta=0.09617908298969269
Fitness changed from -1.7139098569750786 to -1.8591570779681206
Iteration 6 complete. Error: -1.8591570779681206 Total: 21.7477; Orientation: 1.0279; Line Search: 16.6118
Adding measurement 739bbd6b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.848e+03, gradient 2.568e-04, dot -0.312; [54eaf0bc-6b8c-40aa-ba3c-710b5748c79f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8591570779681206, -0.9453887641429901, -0.6056919544935226, -0.6056914776563644
LBFGS Accumulation History: 3 points
Removed measurement 739bbd6b to history. Total: 3
th(0)=-1.8591570779681206;dx=-6.594648911086802E-8
New Minimum: -1.8591570779681206 > -1.9641060084104538
END: th(6515010.502656418)=-1.9641060084104538; dx=-1.0029036280365184E-8 evalInputDelta=0.10494893044233322
Fitness changed from -1.8591570779681206 to -1.9641060084104538
Iteration 7 complete. Error: -1.9641060084104538 Total: 14.8290; Orientation: 1.0106; Line Search: 9.6316
Adding measurement 6cba5422 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.266e+03, gradient 1.837e-04, dot -0.467; [54eaf0bc-6b8c-40aa-ba3c-710b5748c79f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9641060084104538, -0.9453887641429901, -0.6056919544935226, -0.6056914776563644
LBFGS Accumulation History: 3 points
Removed measurement 6cba5422 to history. Total: 3
th(0)=-1.9641060084104538;dx=-3.3752148787536285E-8
New Minimum: -1.9641060084104538 > -2.0340344607830048
WOLF (strong): th(1.4036164632845048E7)=-2.0340344607830048; dx=8.436514444049094E-9 evalInputDelta=0.06992845237255096
New Minimum: -2.0340344607830048 > -2.0369452834129333
END: th(7018082.316422524)=-2.0369452834129333; dx=-8.55483140713951E-9 evalInputDelta=0.07283927500247955
Fitness changed from -1.9641060084104538 to -2.0369452834129333
Iteration 8 complete. Error: -2.0369452834129333 Total: 17.8550; Orientation: 1.0041; Line Search: 12.7392
Adding measurement 74893266 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.357e+03, gradient 1.694e-04, dot -0.466; [54eaf0bc-6b8c-40aa-ba3c-710b5748c79f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0369452834129333, -0.9453887641429901, -0.6056919544935226, -0.6056914776563644
LBFGS Accumulation History: 3 points
Removed measurement 74893266 to history. Total: 3
th(0)=-2.0369452834129333;dx=-2.8682536892862966E-8
New Minimum: -2.0369452834129333 > -2.092545285820961
WOLF (strong): th(1.5120000000000006E7)=-2.092545285820961; dx=3.011348851946939E-9 evalInputDelta=0.05560000240802765
END: th(7560000.000000003)=-2.0921076014637947; dx=-4.533815224308168E-9 evalInputDelta=0.05516231805086136
Fitness changed from -2.0369452834129333 to -2.092545285820961
Iteration 9 complete. Error: -2.092545285820961 Total: 19.0476; Orientation: 1.0100; Line Search: 13.4146
Adding measurement 7de4a2a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.858e+03, gradient 2.328e-04, dot -0.232; [54eaf0bc-6b8c-40aa-ba3c-710b5748c79f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.092545285820961, -0.9453887641429901, -0.6056919544935226, -0.6056914776563644
LBFGS Accumulation History: 3 points
Removed measurement 7de4a2a0 to history. Total: 3
th(0)=-2.092545285820961;dx=-5.42134433683486E-8
Armijo: th(1.6287526256641047E7)=-2.0474545136094093; dx=3.851838358294711E-8 evalInputDelta=-0.045090772211551666
New Minimum: -2.092545285820961 > -2.1646344140172005
WOLF (strong): th(8143763.128320524)=-2.1646344140172005; dx=1.2907837257683559E-8 evalInputDelta=0.07208912819623947
END: th(2714587.7094401745)=-2.1486026495695114; dx=-2.8283848548145124E-8 evalInputDelta=0.056057363748550415
Fitness changed from -2.092545285820961 to -2.1646344140172005
Iteration 10 complete. Error: -2.1646344140172005 Total: 22.2685; Orientation: 1.0062; Line Search: 17.0109
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0623b0f8-7c87-48b3-aeb1-13457ff754f4.jpg)
Final threshold in iteration 11: -2.1646344140172005 (> -Infinity) after 211.055s (< 5400.000s)
Returns
-2.1646344140172005