BasicOptimizer.scala:89 executed in 49.80 seconds (0.557 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: 170031687196300
Reset training subject: 170032581246700
Adding measurement 52890706 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-40.039090329587566;dx=-7.012481661293708E-5
New Minimum: -40.039090329587566 > -40.039246526445055
END: th(2.154434690031884)=-40.039246526445055; dx=-5.868763440183003E-5 evalInputDelta=1.5619685748902157E-4
Fitness changed from -40.039090329587566 to -40.039246526445055
Iteration 1 complete. Error: -40.039246526445055 Total: 4.1433; Orientation: 0.0144; Line Search: 1.6861
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/d86e6e14-476d-4442-9051-d29884932060.jpg)
Adding measurement 3dc27073 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-40.039246526445055;dx=-6.935971265082362E-5
New Minimum: -40.039246526445055 > -40.03957814236855
END: th(4.641588833612779)=-40.03957814236855; dx=-5.854299283189123E-5 evalInputDelta=3.3161592349273405E-4
Fitness changed from -40.039246526445055 to -40.03957814236855
Iteration 2 complete. Error: -40.03957814236855 Total: 2.7047; Orientation: 0.0144; Line Search: 1.7431
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a692c608-d380-4b2e-b150-5e92721a0a1e.jpg)
Adding measurement 2c511d83 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-40.03957814236855;dx=-6.963397381028976E-5
New Minimum: -40.03957814236855 > -40.04029062671161
END: th(10.000000000000002)=-40.04029062671161; dx=-5.877479627168122E-5 evalInputDelta=7.124843430617034E-4
Fitness changed from -40.03957814236855 to -40.04029062671161
Iteration 3 complete. Error: -40.04029062671161 Total: 2.6233; Orientation: 0.0145; Line Search: 1.7016
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/99c99a71-375d-483f-8718-9b8f8409b7a2.jpg)
Adding measurement 5db9f0d3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.833e+02, gradient 8.362e-03, dot -0.916; [db820244-cf60-441c-878f-d39400571612 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.04029062671161, -40.03957814236855, -40.039246526445055, -40.039090329587566
LBFGS Accumulation History: 3 points
Removed measurement 5db9f0d3 to history. Total: 3
th(0)=-40.04029062671161;dx=-6.958290289740606E-5
New Minimum: -40.04029062671161 > -40.04182729092973
END: th(21.544346900318843)=-40.04182729092973; dx=-5.881272460736427E-5 evalInputDelta=0.0015366642181220413
Fitness changed from -40.04029062671161 to -40.04182729092973
Iteration 4 complete. Error: -40.04182729092973 Total: 2.8639; Orientation: 0.2782; Line Search: 1.6704
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/09459201-30d5-45a4-a2fa-ee62b271b1e7.jpg)
Adding measurement 755bc164 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.915e+03, gradient 8.366e-03, dot -0.917; [db820244-cf60-441c-878f-d39400571612 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.04182729092973, -40.03957814236855, -40.039246526445055, -40.039090329587566
LBFGS Accumulation History: 3 points
Removed measurement 755bc164 to history. Total: 3
th(0)=-40.04182729092973;dx=-6.965690690754556E-5
New Minimum: -40.04182729092973 > -40.045143112874406
END: th(46.4158883361278)=-40.045143112874406; dx=-5.874050707102507E-5 evalInputDelta=0.003315821944674724
Fitness changed from -40.04182729092973 to -40.045143112874406
Iteration 5 complete. Error: -40.045143112874406 Total: 2.8344; Orientation: 0.2800; Line Search: 1.6485
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/297e3427-f7ae-42c8-b929-2bd4aaba332c.jpg)
Adding measurement b93baa6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.618e+02, gradient 8.358e-03, dot -0.916; [db820244-cf60-441c-878f-d39400571612 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.045143112874406, -40.03957814236855, -40.039246526445055, -40.039090329587566
LBFGS Accumulation History: 3 points
Removed measurement b93baa6 to history. Total: 3
th(0)=-40.045143112874406;dx=-6.958471504065783E-5
New Minimum: -40.045143112874406 > -40.05227120050222
END: th(100.00000000000003)=-40.05227120050222; dx=-5.868704044310479E-5 evalInputDelta=0.007128087627812363
Fitness changed from -40.045143112874406 to -40.05227120050222
Iteration 6 complete. Error: -40.05227120050222 Total: 3.0715; Orientation: 0.2684; Line Search: 1.6958
Adding measurement 3b0964ee to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.125e+03, gradient 8.398e-03, dot -0.912; [db820244-cf60-441c-878f-d39400571612 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.05227120050222, -40.03957814236855, -40.039246526445055, -40.039090329587566
LBFGS Accumulation History: 3 points
Removed measurement 3b0964ee to history. Total: 3
th(0)=-40.05227120050222;dx=-6.976374238789616E-5
New Minimum: -40.05227120050222 > -40.06765941175148
END: th(215.44346900318845)=-40.06765941175148; dx=-5.87122564604873E-5 evalInputDelta=0.015388211249259598
Fitness changed from -40.05227120050222 to -40.06765941175148
Iteration 7 complete. Error: -40.06765941175148 Total: 2.7633; Orientation: 0.2663; Line Search: 1.6986
Adding measurement 485b4f14 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.461e+03, gradient 8.339e-03, dot -0.915; [db820244-cf60-441c-878f-d39400571612 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.06765941175148, -40.03957814236855, -40.039246526445055, -40.039090329587566
LBFGS Accumulation History: 3 points
Removed measurement 485b4f14 to history. Total: 3
th(0)=-40.06765941175148;dx=-6.944418352745896E-5
New Minimum: -40.06765941175148 > -40.100564393558436
END: th(464.1588833612781)=-40.100564393558436; dx=-5.832344785883596E-5 evalInputDelta=0.03290498180695778
Fitness changed from -40.06765941175148 to -40.100564393558436
Iteration 8 complete. Error: -40.100564393558436 Total: 2.7867; Orientation: 0.2770; Line Search: 1.7021
Adding measurement 7a767830 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.181e+03, gradient 8.349e-03, dot -0.916; [db820244-cf60-441c-878f-d39400571612 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.100564393558436, -40.03957814236855, -40.039246526445055, -40.039090329587566
LBFGS Accumulation History: 3 points
Removed measurement 7a767830 to history. Total: 3
th(0)=-40.100564393558436;dx=-6.954953315163244E-5
New Minimum: -40.100564393558436 > -40.171549900093254
END: th(1000.0000000000005)=-40.171549900093254; dx=-5.858632378284029E-5 evalInputDelta=0.07098550653481794
Fitness changed from -40.100564393558436 to -40.171549900093254
Iteration 9 complete. Error: -40.171549900093254 Total: 2.9264; Orientation: 0.2661; Line Search: 1.8537
Adding measurement 1cb84f2e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.550e+04, gradient 8.353e-03, dot -0.916; [db820244-cf60-441c-878f-d39400571612 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.171549900093254, -40.03957814236855, -40.039246526445055, -40.039090329587566
LBFGS Accumulation History: 3 points
Removed measurement 1cb84f2e to history. Total: 3
th(0)=-40.171549900093254;dx=-6.960417861879377E-5
New Minimum: -40.171549900093254 > -40.32474122319242
END: th(2154.4346900318847)=-40.32474122319242; dx=-5.8854744040598E-5 evalInputDelta=0.15319132309916483
Fitness changed from -40.171549900093254 to -40.32474122319242
Iteration 10 complete. Error: -40.32474122319242 Total: 2.7384; Orientation: 0.2669; Line Search: 1.6857
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a9f1f1be-0c45-447f-9c02-f0d34fb85deb.jpg)
Adding measurement 6d0511d to history. Total: 3
Accepted: LBFGS Orientation magnitude: 9.971e+04, gradient 8.393e-03, dot 0.913; [db820244-cf60-441c-878f-d39400571612 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-40.32474122319242;dx=-763.6094774001926
Armijo: th(4641.588833612781)=-22.55521423936696; dx=5.635106110319953E-4 evalInputDelta=-17.769526983825457
Armijo: th(2320.7944168063905)=-22.65472407220552; dx=0.001215030162084432 evalInputDelta=-17.670017150986897
Armijo: th(773.5981389354635)=-22.751509909595736; dx=0.003583332375307386 evalInputDelta=-17.573231313596683
Armijo: th(193.39953473386586)=-22.86377511671137; dx=0.014517886432961433 evalInputDelta=-17.46096610648105
Armijo: th(38.67990694677317)=-22.920423017382767; dx=0.08209115358889733 evalInputDelta=-17.404318205809652
Armijo: th(6.446651157795529)=-23.655806373190707; dx=0.47171389221308224 evalInputDelta=-16.668934850001712
Armijo: th(0.9209501653993613)=-34.064855987985176; dx=6.969115631025385 evalInputDelta=-6.259885235207243
New Minimum: -40.32474122319242 > -59.121443885546086
END: th(0.11511877067492016)=-59.121443885546086; dx=-26.951670738545637 evalInputDelta=18.796702662353667
Fitness changed from -40.32474122319242 to -59.121443885546086
Iteration 11 complete. Error: -59.121443885546086 Total: 8.9308; Orientation: 0.2692; Line Search: 7.7781
Adding measurement 20e52786 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.775e+04, gradient 8.306e-03, dot -0.060; [db820244-cf60-441c-878f-d39400571612 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.121443885546086, -40.32474122319242, -40.03957814236855, -40.039246526445055, -40.039090329587566
Rejected: LBFGS Orientation magnitude: 2.043e+04, gradient 8.306e-03, dot -0.059; [db820244-cf60-441c-878f-d39400571612 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.121443885546086, -40.32474122319242, -40.03957814236855, -40.039246526445055
LBFGS Accumulation History: 3 points
Removed measurement 20e52786 to history. Total: 4
Removed measurement 6d0511d to history. Total: 3
th(0)=-59.121443885546086;dx=-6.860133905224638E-5
New Minimum: -59.121443885546086 > -59.12146015971775
END: th(0.24801587301587313)=-59.12146015971775; dx=-5.899679608628522E-5 evalInputDelta=1.627417166361056E-5
Fitness changed from -59.121443885546086 to -59.12146015971775
Iteration 12 complete. Error: -59.12146015971775 Total: 3.0551; Orientation: 0.5848; Line Search: 1.6846
Adding measurement 6b59867e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.228e+02, gradient 8.311e-03, dot -0.043; [db820244-cf60-441c-878f-d39400571612 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.12146015971775, -40.03957814236855, -40.039246526445055, -40.039090329587566
LBFGS Accumulation History: 3 points
Removed measurement 6b59867e to history. Total: 3
th(0)=-59.12146015971775;dx=-6.867498599784258E-5
New Minimum: -59.12146015971775 > -59.12149921771146
END: th(0.5343340005039396)=-59.12149921771146; dx=-5.898724656993534E-5 evalInputDelta=3.905799371040075E-5
Fitness changed from -59.12146015971775 to -59.12149921771146
Iteration 13 complete. Error: -59.12149921771146 Total: 2.7894; Orientation: 0.2689; Line Search: 1.7468
Adding measurement 62926c70 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.108e+02, gradient 8.319e-03, dot -0.042; [db820244-cf60-441c-878f-d39400571612 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.12149921771146, -40.03957814236855, -40.039246526445055, -40.039090329587566
LBFGS Accumulation History: 3 points
Removed measurement 62926c70 to history. Total: 3
th(0)=-59.12149921771146;dx=-6.863865313787107E-5
New Minimum: -59.12149921771146 > -59.12158709810298
END: th(1.1511877067492016)=-59.12158709810298; dx=-5.872318365620065E-5 evalInputDelta=8.788039151852445E-5
Fitness changed from -59.12149921771146 to -59.12158709810298
Iteration 14 complete. Error: -59.12158709810298 Total: 2.7299; Orientation: 0.2631; Line Search: 1.6934
Adding measurement 6cbe26dc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.214e+02, gradient 8.296e-03, dot -0.043; [db820244-cf60-441c-878f-d39400571612 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.12158709810298, -40.03957814236855, -40.039246526445055, -40.039090329587566
LBFGS Accumulation History: 3 points
Removed measurement 6cbe26dc to history. Total: 3
th(0)=-59.12158709810298;dx=-6.851686923457273E-5
New Minimum: -59.12158709810298 > -59.12177587776158
END: th(2.480158730158731)=-59.12177587776158; dx=-5.839853298165674E-5 evalInputDelta=1.8877965860042423E-4
Fitness changed from -59.12158709810298 to -59.12177587776158
Iteration 15 complete. Error: -59.12177587776158 Total: 2.7413; Orientation: 0.2637; Line Search: 1.6592
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/b8af3e4c-4f81-48a1-8d30-0f6a58a58d68.jpg)
Final threshold in iteration 16: -59.12177587776158 (> -Infinity) after 49.798s (< 5400.000s)
Returns
-59.12177587776158