BasicOptimizer.scala:89 executed in 154.39 seconds (2.867 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: 456939150944200
Reset training subject: 456942076530300
Adding measurement 188d2b1b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-93.69020011750918;dx=-1.4673272626963661E-5
New Minimum: -93.69020011750918 > -93.69023273653193
WOLFE (weak): th(2.154434690031884)=-93.69023273653193; dx=-1.4454289343274042E-5 evalInputDelta=3.261902274687145E-5
New Minimum: -93.69023273653193 > -93.69026535554332
WOLFE (weak): th(4.308869380063768)=-93.69026535554332; dx=-1.4468459505841842E-5 evalInputDelta=6.523803413926998E-5
New Minimum: -93.69026535554332 > -93.69039583147533
WOLFE (weak): th(12.926608140191302)=-93.69039583147533; dx=-1.4439297655817476E-5 evalInputDelta=1.957139661499241E-4
New Minimum: -93.69039583147533 > -93.69098593626218
WOLFE (weak): th(51.70643256076521)=-93.69098593626218; dx=-1.444933849107464E-5 evalInputDelta=7.858187530018768E-4
New Minimum: -93.69098593626218 > -93.69412618012517
WOLFE (weak): th(258.53216280382605)=-93.69412618012517; dx=-1.4432316293316606E-5 evalInputDelta=0.003926062615988712
New Minimum: -93.69412618012517 > -93.7137718137402
WOLFE (weak): th(1551.1929768229563)=-93.7137718137402; dx=-1.446547549556185E-5 evalInputDelta=0.023571696231016404
New Minimum: -93.7137718137402 > -93.85506286979579
WOLFE (weak): th(10858.350837760694)=-93.85506286979579; dx=-1.4401800474434275E-5 evalInputDelta=0.1648627522866093
New Minimum: -93.85506286979579 > -94.99879890372752
WOLFE (weak): th(86866.80670208555)=-94.99879890372752; dx=-1.4209266468994082E-5 evalInputDelta=1.3085987862183401
New Minimum: -94.99879890372752 > -104.51830142868353
END: th(781801.26031877)=-104.51830142868353; dx=-1.186784033007713E-5 evalInputDelta=10.82810131117435
Fitness changed from -93.69020011750918 to -104.51830142868353
Iteration 1 complete. Error: -104.51830142868353 Total: 38.1799; Orientation: 0.1098; Line Search: 29.5978
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f54b35dd-4b49-4f11-9962-76049ba8749b.jpg)
Adding measurement 3f5396f0 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-104.51830142868353;dx=-1.1212340905283835E-5
New Minimum: -104.51830142868353 > -120.87859342693908
END: th(1684339.7559414052)=-120.87859342693908; dx=-7.3974019193819386E-6 evalInputDelta=16.360291998255548
Fitness changed from -104.51830142868353 to -120.87859342693908
Iteration 2 complete. Error: -120.87859342693908 Total: 9.3965; Orientation: 0.1147; Line Search: 5.7089
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/24fa80d3-bd3b-4175-95c9-b8d6cc35cbad.jpg)
Adding measurement 1bb5a8e9 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-120.87859342693908;dx=-7.5780809230184355E-6
New Minimum: -120.87859342693908 > -141.34459464045418
END: th(3628800.0)=-141.34459464045418; dx=-3.758945277472997E-6 evalInputDelta=20.4660012135151
Fitness changed from -120.87859342693908 to -141.34459464045418
Iteration 3 complete. Error: -141.34459464045418 Total: 9.2173; Orientation: 0.1138; Line Search: 5.6834
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/785de16d-ed62-4957-ba2b-9481a4286525.jpg)
Adding measurement 74dbaba0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.741e+04, gradient 2.415e-03, dot -0.686; [f79e6391-8f14-45f0-87e7-7f9cd9673894 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -141.34459464045418, -120.87859342693908, -104.51830142868353, -93.69020011750918
LBFGS Accumulation History: 3 points
Removed measurement 74dbaba0 to history. Total: 3
th(0)=-141.34459464045418;dx=-5.8194159182185075E-6
New Minimum: -141.34459464045418 > -161.1406136658195
END: th(7818012.6031877)=-161.1406136658195; dx=-7.889958459727733E-7 evalInputDelta=19.796019025365325
Fitness changed from -141.34459464045418 to -161.1406136658195
Iteration 4 complete. Error: -161.1406136658195 Total: 11.6308; Orientation: 2.0077; Line Search: 6.1226
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/f6c72c2d-b28f-479a-b19c-946eb2bb975c.jpg)
Adding measurement 6a747a3f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.317e+04, gradient 2.718e-03, dot -0.444; [f79e6391-8f14-45f0-87e7-7f9cd9673894 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -161.1406136658195, -120.87859342693908, -104.51830142868353, -93.69020011750918
LBFGS Accumulation History: 3 points
Removed measurement 6a747a3f to history. Total: 3
th(0)=-161.1406136658195;dx=-7.347266632530062E-6
Armijo: th(1.684339755941405E7)=-154.29703003674325; dx=1.9939748444826268E-6 evalInputDelta=-6.8435836290762495
New Minimum: -161.1406136658195 > -174.01560046725885
WOLF (strong): th(8421698.779707026)=-174.01560046725885; dx=1.5932390101187694E-6 evalInputDelta=12.874986801439348
New Minimum: -174.01560046725885 > -175.7076304322078
END: th(2807232.9265690087)=-175.7076304322078; dx=-2.658282952511435E-6 evalInputDelta=14.567016766388292
Fitness changed from -161.1406136658195 to -175.7076304322078
Iteration 5 complete. Error: -175.7076304322078 Total: 17.0824; Orientation: 1.9634; Line Search: 11.8325
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/801c900f-6f10-4558-b62b-f90ec301b0ab.jpg)
Adding measurement 208c956a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.302e+04, gradient 1.881e-03, dot -0.615; [f79e6391-8f14-45f0-87e7-7f9cd9673894 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -175.7076304322078, -120.87859342693908, -104.51830142868353, -93.69020011750918
LBFGS Accumulation History: 3 points
Removed measurement 208c956a to history. Total: 3
th(0)=-175.7076304322078;dx=-3.5300050869573134E-6
New Minimum: -175.7076304322078 > -188.36923167934629
END: th(6048000.0)=-188.36923167934629; dx=-1.065974642123972E-6 evalInputDelta=12.661601247138492
Fitness changed from -175.7076304322078 to -188.36923167934629
Iteration 6 complete. Error: -188.36923167934629 Total: 11.4492; Orientation: 2.0011; Line Search: 6.0752
Adding measurement 348a831a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.747e+04, gradient 2.012e-03, dot -0.531; [f79e6391-8f14-45f0-87e7-7f9cd9673894 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -188.36923167934629, -120.87859342693908, -104.51830142868353, -93.69020011750918
LBFGS Accumulation History: 3 points
Removed measurement 348a831a to history. Total: 3
th(0)=-188.36923167934629;dx=-4.030482029805962E-6
New Minimum: -188.36923167934629 > -191.83964301965884
WOLF (strong): th(1.3030021005312834E7)=-191.83964301965884; dx=9.567194956126473E-7 evalInputDelta=3.470411340312552
New Minimum: -191.83964301965884 > -197.5055290950648
WOLF (strong): th(6515010.502656417)=-197.5055290950648; dx=1.5754801944388403E-7 evalInputDelta=9.136297415718502
END: th(2171670.167552139)=-194.99291539223262; dx=-1.9703751239427683E-6 evalInputDelta=6.623683712886333
Fitness changed from -188.36923167934629 to -197.5055290950648
Iteration 7 complete. Error: -197.5055290950648 Total: 16.3303; Orientation: 1.9065; Line Search: 11.6832
Adding measurement 6087b810 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.881e+04, gradient 2.205e-03, dot -0.444; [f79e6391-8f14-45f0-87e7-7f9cd9673894 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -197.5055290950648, -120.87859342693908, -104.51830142868353, -93.69020011750918
LBFGS Accumulation History: 3 points
Removed measurement 6087b810 to history. Total: 3
th(0)=-197.5055290950648;dx=-4.863355540301215E-6
New Minimum: -197.5055290950648 > -208.78606523187932
END: th(4678721.544281682)=-208.78606523187932; dx=-7.953198771125254E-8 evalInputDelta=11.280536136814533
Fitness changed from -197.5055290950648 to -208.78606523187932
Iteration 8 complete. Error: -208.78606523187932 Total: 10.6437; Orientation: 1.8932; Line Search: 6.0122
Adding measurement 527a49cb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.425e+04, gradient 1.779e-03, dot -0.522; [f79e6391-8f14-45f0-87e7-7f9cd9673894 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -208.78606523187932, -120.87859342693908, -104.51830142868353, -93.69020011750918
LBFGS Accumulation History: 3 points
Removed measurement 527a49cb to history. Total: 3
th(0)=-208.78606523187932;dx=-3.149678515705613E-6
New Minimum: -208.78606523187932 > -213.62624862720196
WOLF (strong): th(1.0080000000000002E7)=-213.62624862720196; dx=8.244409580924579E-7 evalInputDelta=4.84018339532264
New Minimum: -213.62624862720196 > -216.48904530608556
END: th(5040000.000000001)=-216.48904530608556; dx=-2.5326602019682987E-7 evalInputDelta=7.702980074206238
Fitness changed from -208.78606523187932 to -216.48904530608556
Iteration 9 complete. Error: -216.48904530608556 Total: 13.3837; Orientation: 1.8300; Line Search: 8.6824
Adding measurement 7421c308 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.801e+04, gradient 1.737e-03, dot -0.516; [f79e6391-8f14-45f0-87e7-7f9cd9673894 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -216.48904530608556, -120.87859342693908, -104.51830142868353, -93.69020011750918
LBFGS Accumulation History: 3 points
Removed measurement 7421c308 to history. Total: 3
th(0)=-216.48904530608556;dx=-3.0163831773604467E-6
New Minimum: -216.48904530608556 > -219.06521213862052
WOLF (strong): th(1.0858350837760696E7)=-219.06521213862052; dx=9.524910297459641E-7 evalInputDelta=2.576166832534966
New Minimum: -219.06521213862052 > -223.37127674934618
WOLF (strong): th(5429175.418880348)=-223.37127674934618; dx=3.859861610680254E-8 evalInputDelta=6.882231443260622
END: th(1809725.1396267826)=-220.8953789450292; dx=-1.7904844541905966E-6 evalInputDelta=4.406333638943636
Fitness changed from -216.48904530608556 to -223.37127674934618
Iteration 10 complete. Error: -223.37127674934618 Total: 16.3389; Orientation: 1.9498; Line Search: 11.6009
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1873ffe6-839a-4ca0-979f-9ebeaab41f6a.jpg)
Final threshold in iteration 11: -223.37127674934618 (> -Infinity) after 154.393s (< 5400.000s)
Returns
-223.37127674934618