BasicOptimizer.scala:89 executed in 291.01 seconds (4.017 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: 650952837375100
Reset training subject: 650958867050400
Adding measurement 4308ae38 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-32.85976841967836;dx=-1.9208219012891017E-6
New Minimum: -32.85976841967836 > -32.859771867385845
END: th(2.154434690031884)=-32.859771867385845; dx=-1.696252753123063E-6 evalInputDelta=3.447707484838247E-6
Fitness changed from -32.85976841967836 to -32.859771867385845
Iteration 1 complete. Error: -32.859771867385845 Total: 30.7926; Orientation: 0.1462; Line Search: 12.1773
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/9b23537f-0e67-4ce4-b82e-b7d8759eff2b.jpg)
Adding measurement 41854d4f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-32.859771867385845;dx=-1.6941037814537357E-6
New Minimum: -32.859771867385845 > -32.859782210506104
WOLFE (weak): th(4.641588833612779)=-32.859782210506104; dx=-1.6935110920760273E-6 evalInputDelta=1.0343120258937688E-5
New Minimum: -32.859782210506104 > -32.859792553623116
WOLFE (weak): th(9.283177667225559)=-32.859792553623116; dx=-1.693173838088828E-6 evalInputDelta=2.0686237270695074E-5
New Minimum: -32.859792553623116 > -32.85982588142244
WOLFE (weak): th(27.849533001676676)=-32.85982588142244; dx=-1.6922478624841668E-6 evalInputDelta=5.401403659277548E-5
New Minimum: -32.85982588142244 > -32.85998332608635
WOLFE (weak): th(111.3981320067067)=-32.85998332608635; dx=-1.6920974110881472E-6 evalInputDelta=2.1145870050531812E-4
New Minimum: -32.85998332608635 > -32.86081995368948
WOLFE (weak): th(556.9906600335335)=-32.86081995368948; dx=-1.6915888236034236E-6 evalInputDelta=0.0010480863036335109
New Minimum: -32.86081995368948 > -32.8660449466515
WOLFE (weak): th(3341.9439602012008)=-32.8660449466515; dx=-1.691742677004559E-6 evalInputDelta=0.0062730792656537915
New Minimum: -32.8660449466515 > -32.90362846676425
WOLFE (weak): th(23393.607721408407)=-32.90362846676425; dx=-1.688730274123321E-6 evalInputDelta=0.043856599378408134
New Minimum: -32.90362846676425 > -33.208387792123204
WOLFE (weak): th(187148.86177126726)=-33.208387792123204; dx=-1.6668397231623979E-6 evalInputDelta=0.34861592473735925
New Minimum: -33.208387792123204 > -35.775709599739685
END: th(1684339.7559414054)=-35.775709599739685; dx=-1.4152810679441426E-6 evalInputDelta=2.9159377323538394
Fitness changed from -32.859771867385845 to -35.775709599739685
Iteration 2 complete. Error: -35.775709599739685 Total: 67.9818; Orientation: 0.1420; Line Search: 60.8215
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/cc34888d-eacc-425e-b38e-6d929050ee1a.jpg)
Adding measurement 44fb044e to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-35.775709599739685;dx=-1.3307032557932788E-6
New Minimum: -35.775709599739685 > -40.11752062087426
END: th(3628800.0000000005)=-40.11752062087426; dx=-8.488247622240079E-7 evalInputDelta=4.341811021134575
Fitness changed from -35.775709599739685 to -40.11752062087426
Iteration 3 complete. Error: -40.11752062087426 Total: 19.3601; Orientation: 0.1391; Line Search: 12.2487
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d0cbaeef-eb61-4609-8d59-0d45efa6254c.jpg)
Adding measurement 2fe9e684 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.117e+03, gradient 9.065e-04, dot -0.777; [27d7c8f0-a64c-4d1d-a9d5-d0559b00f982 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.11752062087426, -35.775709599739685, -32.859771867385845, -32.85976841967836
LBFGS Accumulation History: 3 points
Removed measurement 2fe9e684 to history. Total: 3
th(0)=-40.11752062087426;dx=-8.215836495914416E-7
New Minimum: -40.11752062087426 > -45.40262459162186
END: th(7818012.603187701)=-45.40262459162186; dx=-4.2096282711696955E-7 evalInputDelta=5.285103970747599
Fitness changed from -40.11752062087426 to -45.40262459162186
Iteration 4 complete. Error: -45.40262459162186 Total: 22.4809; Orientation: 2.6022; Line Search: 12.6679
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d34333b4-95a6-420b-b5f0-0aeccc0fb313.jpg)
Adding measurement 4accab31 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.023e+03, gradient 8.105e-04, dot -0.554; [27d7c8f0-a64c-4d1d-a9d5-d0559b00f982 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.40262459162186, -35.775709599739685, -32.859771867385845, -32.85976841967836
LBFGS Accumulation History: 3 points
Removed measurement 4accab31 to history. Total: 3
th(0)=-45.40262459162186;dx=-6.56679416904938E-7
New Minimum: -45.40262459162186 > -50.52817310198118
END: th(1.6843397559414055E7)=-50.52817310198118; dx=-9.078285397463994E-8 evalInputDelta=5.125548510359323
Fitness changed from -45.40262459162186 to -50.52817310198118
Iteration 5 complete. Error: -50.52817310198118 Total: 21.9923; Orientation: 2.8322; Line Search: 12.0729
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/31b58a53-0b40-41f8-8192-8cad59072c0c.jpg)
Adding measurement 174db80f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.034e+04, gradient 1.033e-03, dot -0.294; [27d7c8f0-a64c-4d1d-a9d5-d0559b00f982 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -50.52817310198118, -35.775709599739685, -32.859771867385845, -32.85976841967836
LBFGS Accumulation History: 3 points
Removed measurement 174db80f to history. Total: 3
th(0)=-50.52817310198118;dx=-1.067298199817379E-6
Armijo: th(3.628800000000001E7)=-47.087496595080005; dx=2.0612772925489532E-7 evalInputDelta=-3.440676506901177
New Minimum: -50.52817310198118 > -52.99725075637349
WOLF (strong): th(1.8144000000000004E7)=-52.99725075637349; dx=3.2844225578012695E-7 evalInputDelta=2.469077654392308
New Minimum: -52.99725075637349 > -55.27062717708053
END: th(6048000.000000001)=-55.27062717708053; dx=-2.995907930439835E-7 evalInputDelta=4.742454075099346
Fitness changed from -50.52817310198118 to -55.27062717708053
Iteration 6 complete. Error: -55.27062717708053 Total: 33.6935; Orientation: 2.5245; Line Search: 24.0751
Adding measurement 54678545 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.051e+04, gradient 7.213e-04, dot -0.585; [27d7c8f0-a64c-4d1d-a9d5-d0559b00f982 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.27062717708053, -35.775709599739685, -32.859771867385845, -32.85976841967836
LBFGS Accumulation History: 3 points
Removed measurement 54678545 to history. Total: 3
th(0)=-55.27062717708053;dx=-5.202190110187571E-7
New Minimum: -55.27062717708053 > -59.15143539635805
END: th(1.3030021005312836E7)=-59.15143539635805; dx=-9.772978945362817E-8 evalInputDelta=3.880808219277526
Fitness changed from -55.27062717708053 to -59.15143539635805
Iteration 7 complete. Error: -59.15143539635805 Total: 20.3586; Orientation: 2.4575; Line Search: 11.9426
Adding measurement 57a41c43 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.598e+04, gradient 8.767e-04, dot -0.434; [27d7c8f0-a64c-4d1d-a9d5-d0559b00f982 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.15143539635805, -35.775709599739685, -32.859771867385845, -32.85976841967836
LBFGS Accumulation History: 3 points
Removed measurement 57a41c43 to history. Total: 3
th(0)=-59.15143539635805;dx=-7.679242652987355E-7
Armijo: th(2.8072329265690096E7)=-58.0256999291326; dx=2.0873141022214746E-7 evalInputDelta=-1.1257354672254536
New Minimum: -59.15143539635805 > -61.762128900284345
WOLF (strong): th(1.4036164632845048E7)=-61.762128900284345; dx=1.9326410346598901E-7 evalInputDelta=2.610693503926292
New Minimum: -61.762128900284345 > -62.033317088445436
END: th(4678721.544281683)=-62.033317088445436; dx=-3.226087228093838E-7 evalInputDelta=2.881881692087383
Fitness changed from -59.15143539635805 to -62.033317088445436
Iteration 8 complete. Error: -62.033317088445436 Total: 32.2469; Orientation: 2.4188; Line Search: 23.9326
Adding measurement 13b0556a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.602e+04, gradient 6.055e-04, dot -0.709; [27d7c8f0-a64c-4d1d-a9d5-d0559b00f982 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -62.033317088445436, -35.775709599739685, -32.859771867385845, -32.85976841967836
LBFGS Accumulation History: 3 points
Removed measurement 13b0556a to history. Total: 3
th(0)=-62.033317088445436;dx=-3.6649678926589095E-7
New Minimum: -62.033317088445436 > -65.21773565724463
END: th(1.0080000000000004E7)=-65.21773565724463; dx=-2.3062971299655754E-7 evalInputDelta=3.1844185687991953
Fitness changed from -62.033317088445436 to -65.21773565724463
Iteration 9 complete. Error: -65.21773565724463 Total: 20.5206; Orientation: 2.4615; Line Search: 12.1429
Adding measurement 799aab2d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.294e+04, gradient 6.427e-04, dot -0.645; [27d7c8f0-a64c-4d1d-a9d5-d0559b00f982 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.21773565724463, -35.775709599739685, -32.859771867385845, -32.85976841967836
LBFGS Accumulation History: 3 points
Removed measurement 799aab2d to history. Total: 3
th(0)=-65.21773565724463;dx=-4.1272828645497405E-7
New Minimum: -65.21773565724463 > -68.854486820806
END: th(2.1716701675521396E7)=-68.854486820806; dx=-3.7764594819890985E-8 evalInputDelta=3.636751163561371
Fitness changed from -65.21773565724463 to -68.854486820806
Iteration 10 complete. Error: -68.854486820806 Total: 20.5315; Orientation: 2.4712; Line Search: 12.0804
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0de7e38a-2b94-46fa-9f31-5fee05ebf6a9.jpg)
Final threshold in iteration 11: -68.854486820806 (> -Infinity) after 291.014s (< 5400.000s)
Returns
-68.854486820806