BasicOptimizer.scala:89 executed in 155.72 seconds (2.757 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: 458701839083700
Reset training subject: 458704892141600
Adding measurement 1934504b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-102.7132560095805;dx=-1.5445192062433644E-5
New Minimum: -102.7132560095805 > -102.71327764851874
END: th(2.154434690031884)=-102.71327764851874; dx=-1.2300545332271186E-5 evalInputDelta=2.1638938235923888E-5
Fitness changed from -102.7132560095805 to -102.71327764851874
Iteration 1 complete. Error: -102.71327764851874 Total: 14.5496; Orientation: 0.1094; Line Search: 5.8396
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b0ee166f-5686-4908-8f69-4053eff2ccef.jpg)
Adding measurement 140e110 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-102.71327764851874;dx=-1.2334079631724135E-5
New Minimum: -102.71327764851874 > -102.7133425653061
WOLFE (weak): th(4.641588833612779)=-102.7133425653061; dx=-1.2317585109890676E-5 evalInputDelta=6.491678736608719E-5
New Minimum: -102.7133425653061 > -102.71340748205243
WOLFE (weak): th(9.283177667225559)=-102.71340748205243; dx=-1.2291467043551458E-5 evalInputDelta=1.2983353369122597E-4
New Minimum: -102.71340748205243 > -102.71364550977131
WOLFE (weak): th(27.849533001676676)=-102.71364550977131; dx=-1.2300601212541378E-5 evalInputDelta=3.678612525703784E-4
New Minimum: -102.71364550977131 > -102.71472744699602
WOLFE (weak): th(111.3981320067067)=-102.71472744699602; dx=-1.2279929722878378E-5 evalInputDelta=0.0014497984772816608
New Minimum: -102.71472744699602 > -102.72047775209882
WOLFE (weak): th(556.9906600335335)=-102.72047775209882; dx=-1.2292363906896257E-5 evalInputDelta=0.007200103580075279
New Minimum: -102.72047775209882 > -102.75643825760972
WOLFE (weak): th(3341.9439602012008)=-102.75643825760972; dx=-1.2284536556199774E-5 evalInputDelta=0.0431606090909753
New Minimum: -102.75643825760972 > -103.01480101662935
WOLFE (weak): th(23393.607721408407)=-103.01480101662935; dx=-1.2234834497872241E-5 evalInputDelta=0.3015233681106082
New Minimum: -103.01480101662935 > -105.08087957200611
WOLFE (weak): th(187148.86177126726)=-105.08087957200611; dx=-1.176728599951236E-5 evalInputDelta=2.3676019234873706
New Minimum: -105.08087957200611 > -120.18122328363876
END: th(1684339.7559414054)=-120.18122328363876; dx=-7.5133603178975405E-6 evalInputDelta=17.467945635120017
Fitness changed from -102.71327764851874 to -120.18122328363876
Iteration 2 complete. Error: -120.18122328363876 Total: 33.0643; Orientation: 0.0999; Line Search: 29.3643
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/69d4da35-f0f3-4ad3-b811-3f971fc10c2c.jpg)
Adding measurement 45559c8 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-120.18122328363876;dx=-7.706821368679655E-6
New Minimum: -120.18122328363876 > -139.4600330813503
END: th(3628800.0000000005)=-139.4600330813503; dx=-3.2626295743083008E-6 evalInputDelta=19.278809797711546
Fitness changed from -120.18122328363876 to -139.4600330813503
Iteration 3 complete. Error: -139.4600330813503 Total: 9.4030; Orientation: 0.0960; Line Search: 5.6155
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/55c27a34-5bcf-4cb6-b556-298ce2c1636f.jpg)
Adding measurement 644c14e9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.394e+03, gradient 2.237e-03, dot -0.527; [14cb1757-6c13-4ccb-a4ca-b771f7f255a2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -139.4600330813503, -120.18122328363876, -102.71327764851874, -102.7132560095805
LBFGS Accumulation History: 3 points
Removed measurement 644c14e9 to history. Total: 3
th(0)=-139.4600330813503;dx=-5.002420557782861E-6
New Minimum: -139.4600330813503 > -157.04293467746302
END: th(7818012.603187701)=-157.04293467746302; dx=-6.782595247017135E-7 evalInputDelta=17.58290159611272
Fitness changed from -139.4600330813503 to -157.04293467746302
Iteration 4 complete. Error: -157.04293467746302 Total: 12.2243; Orientation: 2.0252; Line Search: 6.4486
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/89ee33d9-64c4-4206-a328-9d20ef72be26.jpg)
Adding measurement 4fb164c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.598e+03, gradient 2.479e-03, dot -0.275; [14cb1757-6c13-4ccb-a4ca-b771f7f255a2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -157.04293467746302, -120.18122328363876, -102.71327764851874, -102.7132560095805
LBFGS Accumulation History: 3 points
Removed measurement 4fb164c to history. Total: 3
th(0)=-157.04293467746302;dx=-6.125369421614017E-6
Armijo: th(1.6843397559414055E7)=-151.73471828363594; dx=1.6687952780247952E-6 evalInputDelta=-5.308216393827081
New Minimum: -157.04293467746302 > -167.9672415579623
WOLF (strong): th(8421698.779707028)=-167.9672415579623; dx=1.2694426220396501E-6 evalInputDelta=10.924306880499273
New Minimum: -167.9672415579623 > -169.12642721164963
END: th(2807232.926569009)=-169.12642721164963; dx=-2.203223493150034E-6 evalInputDelta=12.083492534186604
Fitness changed from -157.04293467746302 to -169.12642721164963
Iteration 5 complete. Error: -169.12642721164963 Total: 17.2289; Orientation: 1.9763; Line Search: 11.7300
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/34869867-3171-4d60-9c9a-1ae5bda23a2e.jpg)
Adding measurement 528e8867 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.873e+04, gradient 1.742e-03, dot -0.551; [14cb1757-6c13-4ccb-a4ca-b771f7f255a2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -169.12642721164963, -120.18122328363876, -102.71327764851874, -102.7132560095805
LBFGS Accumulation History: 3 points
Removed measurement 528e8867 to history. Total: 3
th(0)=-169.12642721164963;dx=-3.0250215882259615E-6
New Minimum: -169.12642721164963 > -180.19635753550912
END: th(6048000.000000001)=-180.19635753550912; dx=-9.562089440624275E-7 evalInputDelta=11.069930323859495
Fitness changed from -169.12642721164963 to -180.19635753550912
Iteration 6 complete. Error: -180.19635753550912 Total: 11.6021; Orientation: 1.8650; Line Search: 6.0563
Adding measurement 1f6d2d90 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.291e+04, gradient 1.899e-03, dot -0.462; [14cb1757-6c13-4ccb-a4ca-b771f7f255a2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -180.19635753550912, -120.18122328363876, -102.71327764851874, -102.7132560095805
LBFGS Accumulation History: 3 points
Removed measurement 1f6d2d90 to history. Total: 3
th(0)=-180.19635753550912;dx=-3.5996814109902507E-6
New Minimum: -180.19635753550912 > -183.48597427684183
WOLF (strong): th(1.3030021005312836E7)=-183.48597427684183; dx=8.149577466000803E-7 evalInputDelta=3.2896167413327078
New Minimum: -183.48597427684183 > -188.32708022463947
WOLF (strong): th(6515010.502656418)=-188.32708022463947; dx=1.3905988407551614E-7 evalInputDelta=8.130722689130351
END: th(2171670.167552139)=-186.10418489959636; dx=-1.7322901919873558E-6 evalInputDelta=5.90782736408724
Fitness changed from -180.19635753550912 to -188.32708022463947
Iteration 7 complete. Error: -188.32708022463947 Total: 16.3104; Orientation: 2.0222; Line Search: 11.5759
Adding measurement 418383ce to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.508e+04, gradient 2.104e-03, dot -0.369; [14cb1757-6c13-4ccb-a4ca-b771f7f255a2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -188.32708022463947, -120.18122328363876, -102.71327764851874, -102.7132560095805
LBFGS Accumulation History: 3 points
Removed measurement 418383ce to history. Total: 3
th(0)=-188.32708022463947;dx=-4.410322673367471E-6
New Minimum: -188.32708022463947 > -198.72941400093936
END: th(4678721.544281682)=-198.72941400093936; dx=-9.917984520000539E-8 evalInputDelta=10.402333776299884
Fitness changed from -188.32708022463947 to -198.72941400093936
Iteration 8 complete. Error: -198.72941400093936 Total: 10.6872; Orientation: 1.9153; Line Search: 6.0352
Adding measurement 65b401b8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.211e+04, gradient 1.702e-03, dot -0.481; [14cb1757-6c13-4ccb-a4ca-b771f7f255a2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -198.72941400093936, -120.18122328363876, -102.71327764851874, -102.7132560095805
LBFGS Accumulation History: 3 points
Removed measurement 65b401b8 to history. Total: 3
th(0)=-198.72941400093936;dx=-2.881506641161044E-6
New Minimum: -198.72941400093936 > -203.6204853292718
WOLF (strong): th(1.0080000000000002E7)=-203.6204853292718; dx=7.102442820160343E-7 evalInputDelta=4.89107132833243
New Minimum: -203.6204853292718 > -205.97132888722544
END: th(5040000.000000001)=-205.97132888722544; dx=-2.541925503646014E-7 evalInputDelta=7.241914886286082
Fitness changed from -198.72941400093936 to -205.97132888722544
Iteration 9 complete. Error: -205.97132888722544 Total: 13.5612; Orientation: 1.8648; Line Search: 8.9250
Adding measurement 37ffee42 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.618e+04, gradient 1.669e-03, dot -0.481; [14cb1757-6c13-4ccb-a4ca-b771f7f255a2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -205.97132888722544, -120.18122328363876, -102.71327764851874, -102.7132560095805
LBFGS Accumulation History: 3 points
Removed measurement 37ffee42 to history. Total: 3
th(0)=-205.97132888722544;dx=-2.7751655985234774E-6
New Minimum: -205.97132888722544 > -208.93982364372843
WOLF (strong): th(1.0858350837760696E7)=-208.93982364372843; dx=8.177157840504752E-7 evalInputDelta=2.9684947565029915
New Minimum: -208.93982364372843 > -212.53273804271294
WOLF (strong): th(5429175.418880348)=-212.53273804271294; dx=7.458438863758414E-9 evalInputDelta=6.561409155487496
END: th(1809725.1396267826)=-210.0919585610725; dx=-1.6529113955734678E-6 evalInputDelta=4.1206296738470485
Fitness changed from -205.97132888722544 to -212.53273804271294
Iteration 10 complete. Error: -212.53273804271294 Total: 16.4577; Orientation: 1.8164; Line Search: 11.5172
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0d23e657-5f1e-48bc-b79e-079a1dd02858.jpg)
Final threshold in iteration 11: -212.53273804271294 (> -Infinity) after 155.715s (< 5400.000s)
Returns
-212.53273804271294