BasicOptimizer.scala:89 executed in 87.64 seconds (0.840 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: 310309801144400
Reset training subject: 310311530059900
Adding measurement 6101c7fb to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-150.36955511768522;dx=-2.9105249022645342E-5
New Minimum: -150.36955511768522 > -150.36958933603754
END: th(2.154434690031884)=-150.36958933603754; dx=-1.827264064185176E-5 evalInputDelta=3.42183523116546E-5
Fitness changed from -150.36955511768522 to -150.36958933603754
Iteration 1 complete. Error: -150.36958933603754 Total: 8.2294; Orientation: 0.0629; Line Search: 3.3252
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/48428afa-f38e-4781-ab7d-cc552f67ea05.jpg)
Adding measurement 2d7d36d8 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-150.36958933603754;dx=-1.8150035877981257E-5
New Minimum: -150.36958933603754 > -150.36969199104774
WOLFE (weak): th(4.641588833612779)=-150.36969199104774; dx=-1.811048586494008E-5 evalInputDelta=1.0265501020967349E-4
New Minimum: -150.36969199104774 > -150.36978095866658
WOLFE (weak): th(9.283177667225559)=-150.36978095866658; dx=-1.81308111493656E-5 evalInputDelta=1.916226290461509E-4
New Minimum: -150.36978095866658 > -150.3701573595484
WOLFE (weak): th(27.849533001676676)=-150.3701573595484; dx=-1.8120232203791418E-5 evalInputDelta=5.680235108513898E-4
New Minimum: -150.3701573595484 > -150.3718340429392
WOLFE (weak): th(111.3981320067067)=-150.3718340429392; dx=-1.810538495221758E-5 evalInputDelta=0.002244706901677773
New Minimum: -150.3718340429392 > -150.38077147652345
WOLFE (weak): th(556.9906600335335)=-150.38077147652345; dx=-1.8095655342899903E-5 evalInputDelta=0.01118214048591426
New Minimum: -150.38077147652345 > -150.43660814564691
WOLFE (weak): th(3341.9439602012008)=-150.43660814564691; dx=-1.8097892173897375E-5 evalInputDelta=0.06701880960937956
New Minimum: -150.43660814564691 > -150.83789101299783
WOLFE (weak): th(23393.607721408407)=-150.83789101299783; dx=-1.8020315052295267E-5 evalInputDelta=0.46830167696029434
New Minimum: -150.83789101299783 > -154.0580725062335
WOLFE (weak): th(187148.86177126726)=-154.0580725062335; dx=-1.7475330497725105E-5 evalInputDelta=3.6884831701959513
New Minimum: -154.0580725062335 > -177.24330838555102
END: th(1684339.7559414054)=-177.24330838555102; dx=-1.0286877365881332E-5 evalInputDelta=26.873719049513483
Fitness changed from -150.36958933603754 to -177.24330838555102
Iteration 2 complete. Error: -177.24330838555102 Total: 18.5547; Orientation: 0.0710; Line Search: 16.5517
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/8ddb6ed4-dc66-45f9-b016-01410db0296c.jpg)
Adding measurement 2599e60d to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-177.24330838555102;dx=-1.2863398069960585E-5
New Minimum: -177.24330838555102 > -208.10280527784775
END: th(3628800.0000000005)=-208.10280527784775; dx=-4.31298551527754E-6 evalInputDelta=30.859496892296733
Fitness changed from -177.24330838555102 to -208.10280527784775
Iteration 3 complete. Error: -208.10280527784775 Total: 5.9720; Orientation: 0.0649; Line Search: 3.7080
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c19897b4-23e8-444a-8adb-441bcf4d8840.jpg)
Adding measurement 43f08669 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.356e+04, gradient 3.137e-03, dot -0.413; [e3bf263c-882c-4d7b-a9ee-7995696b5c81 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -208.10280527784775, -177.24330838555102, -150.36958933603754, -150.36955511768522
LBFGS Accumulation History: 3 points
Removed measurement 43f08669 to history. Total: 3
th(0)=-208.10280527784775;dx=-9.83801095612525E-6
New Minimum: -208.10280527784775 > -232.54587431470205
END: th(7818012.603187701)=-232.54587431470205; dx=-1.1499671155840498E-8 evalInputDelta=24.443069036854297
Fitness changed from -208.10280527784775 to -232.54587431470205
Iteration 4 complete. Error: -232.54587431470205 Total: 6.8243; Orientation: 1.1949; Line Search: 3.3653
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/424e895d-3ef8-4716-8868-49192d92e037.jpg)
Adding measurement 21841c3f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.174e+03, gradient 3.711e-03, dot -0.153; [e3bf263c-882c-4d7b-a9ee-7995696b5c81 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -232.54587431470205, -177.24330838555102, -150.36958933603754, -150.36955511768522
LBFGS Accumulation History: 3 points
Removed measurement 21841c3f to history. Total: 3
th(0)=-232.54587431470205;dx=-1.3772953112007515E-5
Armijo: th(1.6843397559414055E7)=-206.51812223203098; dx=3.102599484482105E-6 evalInputDelta=-26.02775208267107
New Minimum: -232.54587431470205 > -244.25689836597314
WOLF (strong): th(8421698.779707028)=-244.25689836597314; dx=4.127348178476811E-6 evalInputDelta=11.711024051271096
New Minimum: -244.25689836597314 > -258.4963080659096
END: th(2807232.926569009)=-258.4963080659096; dx=-3.166731679223464E-6 evalInputDelta=25.950433751207555
Fitness changed from -232.54587431470205 to -258.4963080659096
Iteration 5 complete. Error: -258.4963080659096 Total: 9.5260; Orientation: 1.1071; Line Search: 6.5571
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f8e57cf0-950f-46d7-b2d6-4544030e71ac.jpg)
Adding measurement 4b05c6fe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.326e+04, gradient 2.486e-03, dot -0.393; [e3bf263c-882c-4d7b-a9ee-7995696b5c81 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -258.4963080659096, -177.24330838555102, -150.36958933603754, -150.36955511768522
LBFGS Accumulation History: 3 points
Removed measurement 4b05c6fe to history. Total: 3
th(0)=-258.4963080659096;dx=-6.180031520062314E-6
New Minimum: -258.4963080659096 > -276.23319324190953
END: th(6048000.000000001)=-276.23319324190953; dx=-2.890469573007747E-7 evalInputDelta=17.73688517599993
Fitness changed from -258.4963080659096 to -276.23319324190953
Iteration 6 complete. Error: -276.23319324190953 Total: 6.3231; Orientation: 1.1217; Line Search: 3.3419
Adding measurement 7a687140 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.310e+04, gradient 2.900e-03, dot -0.269; [e3bf263c-882c-4d7b-a9ee-7995696b5c81 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -276.23319324190953, -177.24330838555102, -150.36958933603754, -150.36955511768522
LBFGS Accumulation History: 3 points
Removed measurement 7a687140 to history. Total: 3
th(0)=-276.23319324190953;dx=-8.400434480688172E-6
Armijo: th(1.3030021005312836E7)=-257.2869744134053; dx=2.991968199286094E-6 evalInputDelta=-18.946218828504243
New Minimum: -276.23319324190953 > -282.7462450663591
WOLF (strong): th(6515010.502656418)=-282.7462450663591; dx=3.0811622137905116E-6 evalInputDelta=6.513051824449576
New Minimum: -282.7462450663591 > -289.1747082964265
END: th(2171670.167552139)=-289.1747082964265; dx=-2.5357285347089413E-6 evalInputDelta=12.94151505451697
Fitness changed from -276.23319324190953 to -289.1747082964265
Iteration 7 complete. Error: -289.1747082964265 Total: 9.3465; Orientation: 1.0594; Line Search: 6.7280
Adding measurement 7481c2a6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.154e+04, gradient 1.880e-03, dot -0.489; [e3bf263c-882c-4d7b-a9ee-7995696b5c81 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -289.1747082964265, -177.24330838555102, -150.36958933603754, -150.36955511768522
LBFGS Accumulation History: 3 points
Removed measurement 7481c2a6 to history. Total: 3
th(0)=-289.1747082964265;dx=-3.5242455900060796E-6
New Minimum: -289.1747082964265 > -300.69715560422395
END: th(4678721.544281682)=-300.69715560422395; dx=-1.4014972696899414E-6 evalInputDelta=11.52244730779745
Fitness changed from -289.1747082964265 to -300.69715560422395
Iteration 8 complete. Error: -300.69715560422395 Total: 5.8432; Orientation: 1.0397; Line Search: 3.2243
Adding measurement 77df6e4b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.166e+04, gradient 2.001e-03, dot -0.414; [e3bf263c-882c-4d7b-a9ee-7995696b5c81 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -300.69715560422395, -177.24330838555102, -150.36958933603754, -150.36955511768522
LBFGS Accumulation History: 3 points
Removed measurement 77df6e4b to history. Total: 3
th(0)=-300.69715560422395;dx=-3.999861848802357E-6
New Minimum: -300.69715560422395 > -303.43864840992876
WOLF (strong): th(1.0080000000000002E7)=-303.43864840992876; dx=1.1313270186157987E-6 evalInputDelta=2.7414928057048087
New Minimum: -303.43864840992876 > -308.5018634314491
WOLF (strong): th(5040000.000000001)=-308.5018634314491; dx=1.1581330135352308E-7 evalInputDelta=7.804707827225172
END: th(1680000.0000000002)=-306.0662638912308; dx=-2.0937637996938723E-6 evalInputDelta=5.3691082870068385
Fitness changed from -300.69715560422395 to -308.5018634314491
Iteration 9 complete. Error: -308.5018634314491 Total: 9.2285; Orientation: 0.9729; Line Search: 6.4654
Adding measurement 16d1537d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.816e+04, gradient 2.323e-03, dot -0.298; [e3bf263c-882c-4d7b-a9ee-7995696b5c81 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -308.5018634314491, -177.24330838555102, -150.36958933603754, -150.36955511768522
LBFGS Accumulation History: 3 points
Removed measurement 16d1537d to history. Total: 3
th(0)=-308.5018634314491;dx=-5.386385057785987E-6
New Minimum: -308.5018634314491 > -317.45446954368776
WOLF (strong): th(3619450.2792535652)=-317.45446954368776; dx=5.245509851721158E-7 evalInputDelta=8.952606112238641
END: th(1809725.1396267826)=-316.06711907099645; dx=-2.342577449134535E-6 evalInputDelta=7.565255639547331
Fitness changed from -308.5018634314491 to -317.45446954368776
Iteration 10 complete. Error: -317.45446954368776 Total: 7.5057; Orientation: 0.9735; Line Search: 4.7952
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/09b00a89-85de-4a97-97af-fb1c52b3fe2d.jpg)
Final threshold in iteration 11: -317.45446954368776 (> -Infinity) after 87.637s (< 5400.000s)
Returns
-317.45446954368776