BasicOptimizer.scala:89 executed in 95.94 seconds (1.290 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: 287347648547000
Reset training subject: 287349701721100
Adding measurement 1df20db6 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-55.090062074026065;dx=-5.109748105083627E-6
New Minimum: -55.090062074026065 > -55.09006887815585
END: th(2.154434690031884)=-55.09006887815585; dx=-3.3776150917322916E-6 evalInputDelta=6.80412978226741E-6
Fitness changed from -55.090062074026065 to -55.09006887815585
Iteration 1 complete. Error: -55.09006887815585 Total: 9.7654; Orientation: 0.0578; Line Search: 3.8622
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ffb35051-6fa8-404f-aec4-31e4f37c510c.jpg)
Adding measurement e4ced1f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-55.09006887815585;dx=-3.377613796663415E-6
New Minimum: -55.09006887815585 > -55.09008758950843
WOLFE (weak): th(4.641588833612779)=-55.09008758950843; dx=-3.377627396153542E-6 evalInputDelta=1.8711352581135543E-5
New Minimum: -55.09008758950843 > -55.09010459982344
WOLFE (weak): th(9.283177667225559)=-55.09010459982344; dx=-3.3776389438905522E-6 evalInputDelta=3.572166759369111E-5
New Minimum: -55.09010459982344 > -55.090165836914
WOLFE (weak): th(27.849533001676676)=-55.090165836914; dx=-3.3776175916288644E-6 evalInputDelta=9.695875814941246E-5
New Minimum: -55.090165836914 > -55.09044650604141
WOLFE (weak): th(111.3981320067067)=-55.09044650604141; dx=-3.3775880564621373E-6 evalInputDelta=3.776278855625037E-4
New Minimum: -55.09044650604141 > -55.09195188877676
WOLFE (weak): th(556.9906600335335)=-55.09195188877676; dx=-3.3774065082848122E-6 evalInputDelta=0.0018830106209151154
New Minimum: -55.09195188877676 > -55.101357473224674
WOLFE (weak): th(3341.9439602012008)=-55.101357473224674; dx=-3.3766573308444772E-6 evalInputDelta=0.011288595068826623
New Minimum: -55.101357473224674 > -55.168991277397495
WOLFE (weak): th(23393.607721408407)=-55.168991277397495; dx=-3.369596375054882E-6 evalInputDelta=0.07892239924164812
New Minimum: -55.168991277397495 > -55.71647638400325
WOLFE (weak): th(187148.86177126726)=-55.71647638400325; dx=-3.317719601354544E-6 evalInputDelta=0.6264075058474035
New Minimum: -55.71647638400325 > -60.25096497883754
END: th(1684339.7559414054)=-60.25096497883754; dx=-2.710832576983766E-6 evalInputDelta=5.16089610068169
Fitness changed from -55.09006887815585 to -60.25096497883754
Iteration 2 complete. Error: -60.25096497883754 Total: 21.5537; Orientation: 0.0636; Line Search: 19.3590
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a8deeaf2-595e-4e93-b02f-ed716df743c2.jpg)
Adding measurement 1f2ae08c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-60.25096497883754;dx=-2.44032816580323E-6
New Minimum: -60.25096497883754 > -67.44861999198606
END: th(3628800.0000000005)=-67.44861999198606; dx=-1.516376335462345E-6 evalInputDelta=7.197655013148527
Fitness changed from -60.25096497883754 to -67.44861999198606
Iteration 3 complete. Error: -67.44861999198606 Total: 6.2484; Orientation: 0.0548; Line Search: 3.7586
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/6f7ec582-d959-420e-841c-a8188947ac1b.jpg)
Adding measurement 345a153e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.955e+03, gradient 1.200e-03, dot -0.774; [cdbee7af-f321-47a7-8c97-4dfd95a3b69c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.44861999198606, -60.25096497883754, -55.09006887815585, -55.090062074026065
LBFGS Accumulation History: 3 points
Removed measurement 345a153e to history. Total: 3
th(0)=-67.44861999198606;dx=-1.4397483123478793E-6
New Minimum: -67.44861999198606 > -75.57142942229746
END: th(7818012.603187701)=-75.57142942229746; dx=-6.735206502794926E-7 evalInputDelta=8.122809430311392
Fitness changed from -67.44861999198606 to -75.57142942229746
Iteration 4 complete. Error: -75.57142942229746 Total: 7.1702; Orientation: 1.0182; Line Search: 4.0012
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/f92df904-d5a4-4f74-be51-c5e77e789307.jpg)
Adding measurement 2f021229 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.767e+03, gradient 1.020e-03, dot -0.538; [cdbee7af-f321-47a7-8c97-4dfd95a3b69c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.57142942229746, -60.25096497883754, -55.09006887815585, -55.090062074026065
LBFGS Accumulation History: 3 points
Removed measurement 2f021229 to history. Total: 3
th(0)=-75.57142942229746;dx=-1.0410644907543961E-6
New Minimum: -75.57142942229746 > -82.49934240559024
END: th(1.6843397559414055E7)=-82.49934240559024; dx=-6.778731789108024E-8 evalInputDelta=6.927912983292785
Fitness changed from -75.57142942229746 to -82.49934240559024
Iteration 5 complete. Error: -82.49934240559024 Total: 7.1239; Orientation: 1.0162; Line Search: 3.9454
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/4e9653b6-18e8-4452-be01-03e0ef8f5f58.jpg)
Adding measurement 1f252f53 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.043e+03, gradient 1.247e-03, dot -0.224; [cdbee7af-f321-47a7-8c97-4dfd95a3b69c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -82.49934240559024, -60.25096497883754, -55.09006887815585, -55.090062074026065
LBFGS Accumulation History: 3 points
Removed measurement 1f252f53 to history. Total: 3
th(0)=-82.49934240559024;dx=-1.5558616178152216E-6
Armijo: th(3.628800000000001E7)=-76.75604226378094; dx=3.783692069945412E-7 evalInputDelta=-5.7433001418093
New Minimum: -82.49934240559024 > -85.23689746378206
WOLF (strong): th(1.8144000000000004E7)=-85.23689746378206; dx=5.288760132083871E-7 evalInputDelta=2.737555058191816
New Minimum: -85.23689746378206 > -88.47826583109924
END: th(6048000.000000001)=-88.47826583109924; dx=-3.793110795337361E-7 evalInputDelta=5.978923425508995
Fitness changed from -82.49934240559024 to -88.47826583109924
Iteration 6 complete. Error: -88.47826583109924 Total: 10.8311; Orientation: 1.0051; Line Search: 7.7813
Adding measurement 67260d19 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.570e+04, gradient 8.425e-04, dot -0.500; [cdbee7af-f321-47a7-8c97-4dfd95a3b69c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -88.47826583109924, -60.25096497883754, -55.09006887815585, -55.090062074026065
LBFGS Accumulation History: 3 points
Removed measurement 67260d19 to history. Total: 3
th(0)=-88.47826583109924;dx=-7.098584427176616E-7
New Minimum: -88.47826583109924 > -92.93465496734102
END: th(1.3030021005312836E7)=-92.93465496734102; dx=-7.312211768581501E-8 evalInputDelta=4.456389136241782
Fitness changed from -88.47826583109924 to -92.93465496734102
Iteration 7 complete. Error: -92.93465496734102 Total: 6.8001; Orientation: 0.9707; Line Search: 4.0183
Adding measurement 22cb6ba to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.749e+04, gradient 1.002e-03, dot -0.363; [cdbee7af-f321-47a7-8c97-4dfd95a3b69c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -92.93465496734102, -60.25096497883754, -55.09006887815585, -55.090062074026065
LBFGS Accumulation History: 3 points
Removed measurement 22cb6ba to history. Total: 3
th(0)=-92.93465496734102;dx=-1.004133208668486E-6
Armijo: th(2.8072329265690096E7)=-90.82234346392028; dx=3.1170660633985455E-7 evalInputDelta=-2.1123115034207416
New Minimum: -92.93465496734102 > -95.57363099079507
WOLF (strong): th(1.4036164632845048E7)=-95.57363099079507; dx=3.125781533394373E-7 evalInputDelta=2.638976023454049
New Minimum: -95.57363099079507 > -96.24204226056379
END: th(4678721.544281683)=-96.24204226056379; dx=-3.790368321625656E-7 evalInputDelta=3.3073872932227744
Fitness changed from -92.93465496734102 to -96.24204226056379
Iteration 8 complete. Error: -96.24204226056379 Total: 10.5713; Orientation: 0.9791; Line Search: 7.7989
Adding measurement 101e9514 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.325e+04, gradient 6.740e-04, dot -0.617; [cdbee7af-f321-47a7-8c97-4dfd95a3b69c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -96.24204226056379, -60.25096497883754, -55.09006887815585, -55.090062074026065
LBFGS Accumulation History: 3 points
Removed measurement 101e9514 to history. Total: 3
th(0)=-96.24204226056379;dx=-4.542392839324304E-7
New Minimum: -96.24204226056379 > -99.54734119783615
END: th(1.0080000000000004E7)=-99.54734119783615; dx=-2.242203309138933E-7 evalInputDelta=3.3052989372723545
Fitness changed from -96.24204226056379 to -99.54734119783615
Iteration 9 complete. Error: -99.54734119783615 Total: 6.7530; Orientation: 0.9472; Line Search: 3.8839
Adding measurement 1ac32081 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.517e+04, gradient 7.217e-04, dot -0.537; [cdbee7af-f321-47a7-8c97-4dfd95a3b69c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -99.54734119783615, -60.25096497883754, -55.09006887815585, -55.090062074026065
LBFGS Accumulation History: 3 points
Removed measurement 1ac32081 to history. Total: 3
th(0)=-99.54734119783615;dx=-5.208045344285977E-7
New Minimum: -99.54734119783615 > -102.18217528540015
WOLF (strong): th(2.1716701675521396E7)=-102.18217528540015; dx=5.6426046029710964E-8 evalInputDelta=2.634834087564002
New Minimum: -102.18217528540015 > -102.27830685907857
END: th(1.0858350837760698E7)=-102.27830685907857; dx=-6.383129631295395E-8 evalInputDelta=2.730965661242422
Fitness changed from -99.54734119783615 to -102.27830685907857
Iteration 10 complete. Error: -102.27830685907857 Total: 8.7333; Orientation: 1.0556; Line Search: 5.7553
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ca3737b2-7ce2-48c6-b53f-e0c8f3554bff.jpg)
Final threshold in iteration 11: -102.27830685907857 (> -Infinity) after 95.936s (< 5400.000s)
Returns
-102.27830685907857