BasicOptimizer.scala:89 executed in 44.60 seconds (0.859 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: 217303325363300
Reset training subject: 217303948852700
Adding measurement 5e89d8bf to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-4.2088341994311875;dx=-3.726735290066349E-5
New Minimum: -4.2088341994311875 > -4.208893010959792
WOLFE (weak): th(2.154434690031884)=-4.208893010959792; dx=-3.7279597312963E-5 evalInputDelta=5.881152860442995E-5
New Minimum: -4.208893010959792 > -4.208952581285334
WOLFE (weak): th(4.308869380063768)=-4.208952581285334; dx=-3.728147378843587E-5 evalInputDelta=1.1838185414614344E-4
New Minimum: -4.208952581285334 > -4.209188268841866
WOLFE (weak): th(12.926608140191302)=-4.209188268841866; dx=-3.7259225574596766E-5 evalInputDelta=3.5406941067872566E-4
New Minimum: -4.209188268841866 > -4.210249646268632
WOLFE (weak): th(51.70643256076521)=-4.210249646268632; dx=-3.73105657015687E-5 evalInputDelta=0.001415446837444101
New Minimum: -4.210249646268632 > -4.215907924299816
WOLFE (weak): th(258.53216280382605)=-4.215907924299816; dx=-3.720491315907778E-5 evalInputDelta=0.007073724868628339
New Minimum: -4.215907924299816 > -4.250952435531227
WOLFE (weak): th(1551.1929768229563)=-4.250952435531227; dx=-3.6844113339395515E-5 evalInputDelta=0.0421182361000394
New Minimum: -4.250952435531227 > -4.495038214667861
WOLFE (weak): th(10858.350837760694)=-4.495038214667861; dx=-3.387777092360139E-5 evalInputDelta=0.2862040152366738
New Minimum: -4.495038214667861 > -5.418453060069583
END: th(86866.80670208555)=-5.418453060069583; dx=-1.3247123650067223E-5 evalInputDelta=1.209618860638395
Fitness changed from -4.2088341994311875 to -5.418453060069583
Iteration 1 complete. Error: -5.418453060069583 Total: 7.1688; Orientation: 0.0158; Line Search: 5.4186
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f50ab421-2b56-410d-b19f-d4a0caf1e06f.jpg)
Adding measurement 451a03a2 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-5.418453060069583;dx=-3.788635506628503E-5
New Minimum: -5.418453060069583 > -6.224269586942244
END: th(187148.86177126726)=-6.224269586942244; dx=-6.962067723007811E-6 evalInputDelta=0.8058165268726611
Fitness changed from -5.418453060069583 to -6.224269586942244
Iteration 2 complete. Error: -6.224269586942244 Total: 1.8015; Orientation: 0.0162; Line Search: 1.2038
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/1220cc6a-1f8e-4d3d-b77d-c8e45052f508.jpg)
Adding measurement 58303389 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-6.224269586942244;dx=-3.452500936676446E-5
Armijo: th(403200.00000000006)=-4.924224125434345; dx=-1.2384419563985781E-6 evalInputDelta=-1.3000454615078985
New Minimum: -6.224269586942244 > -7.27090116186057
END: th(201600.00000000003)=-7.27090116186057; dx=-8.0747466126025E-6 evalInputDelta=1.046631574918326
Fitness changed from -6.224269586942244 to -7.27090116186057
Iteration 3 complete. Error: -7.27090116186057 Total: 2.6261; Orientation: 0.0164; Line Search: 1.8250
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/111f4262-129a-43d6-b50d-10471b3d9b68.jpg)
Adding measurement 5f756112 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.625e+03, gradient 6.026e-03, dot -0.308; [a8512086-72db-4ca3-815b-d116f96c328d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.27090116186057, -6.224269586942244, -5.418453060069583, -4.2088341994311875
LBFGS Accumulation History: 3 points
Removed measurement 5f756112 to history. Total: 3
th(0)=-7.27090116186057;dx=-3.630023197954403E-5
Armijo: th(434334.03351042786)=-4.621191741016874; dx=-7.651267254797395E-7 evalInputDelta=-2.6497094208436955
New Minimum: -7.27090116186057 > -7.852038827570654
END: th(217167.01675521393)=-7.852038827570654; dx=-6.757307504883014E-6 evalInputDelta=0.5811376657100844
Fitness changed from -7.27090116186057 to -7.852038827570654
Iteration 4 complete. Error: -7.852038827570654 Total: 2.7036; Orientation: 0.2913; Line Search: 1.8242
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/316ad1cf-388b-453f-a2d3-103e8b0b8578.jpg)
Adding measurement 7ff252a2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.296e+03, gradient 6.396e-03, dot -0.266; [a8512086-72db-4ca3-815b-d116f96c328d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.852038827570654, -6.224269586942244, -5.418453060069583, -4.2088341994311875
LBFGS Accumulation History: 3 points
Removed measurement 7ff252a2 to history. Total: 3
th(0)=-7.852038827570654;dx=-4.088522210532154E-5
Armijo: th(467872.15442816826)=-4.233861047637115; dx=1.9531681493132317E-7 evalInputDelta=-3.6181777799335393
New Minimum: -7.852038827570654 > -8.366250317657027
END: th(233936.07721408413)=-8.366250317657027; dx=-6.076109743902407E-6 evalInputDelta=0.5142114900863728
Fitness changed from -7.852038827570654 to -8.366250317657027
Iteration 5 complete. Error: -8.366250317657027 Total: 2.6757; Orientation: 0.2925; Line Search: 1.7921
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/94dee73f-2575-45b0-9cff-49974f8bb310.jpg)
Adding measurement 5d9e4d7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.205e+03, gradient 6.431e-03, dot -0.247; [a8512086-72db-4ca3-815b-d116f96c328d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.366250317657027, -6.224269586942244, -5.418453060069583, -4.2088341994311875
LBFGS Accumulation History: 3 points
Removed measurement 5d9e4d7 to history. Total: 3
th(0)=-8.366250317657027;dx=-4.1323976975194894E-5
Armijo: th(504000.0000000002)=-4.117230016089064; dx=7.809687633037509E-7 evalInputDelta=-4.249020301567963
New Minimum: -8.366250317657027 > -8.7958523478747
END: th(252000.0000000001)=-8.7958523478747; dx=-5.681945088542315E-6 evalInputDelta=0.42960203021767285
Fitness changed from -8.366250317657027 to -8.7958523478747
Iteration 6 complete. Error: -8.7958523478747 Total: 2.6843; Orientation: 0.2924; Line Search: 1.8124
Adding measurement 7605d99 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.921e+03, gradient 6.486e-03, dot -0.232; [a8512086-72db-4ca3-815b-d116f96c328d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.7958523478747, -6.224269586942244, -5.418453060069583, -4.2088341994311875
LBFGS Accumulation History: 3 points
Removed measurement 7605d99 to history. Total: 3
th(0)=-8.7958523478747;dx=-4.204113452200338E-5
Armijo: th(542917.5418880349)=-3.3883887653195366; dx=1.4227756523920142E-6 evalInputDelta=-5.407463582555163
New Minimum: -8.7958523478747 > -9.201827975915869
END: th(271458.77094401745)=-9.201827975915869; dx=-5.539195379542442E-6 evalInputDelta=0.40597562804116905
Fitness changed from -8.7958523478747 to -9.201827975915869
Iteration 7 complete. Error: -9.201827975915869 Total: 2.8921; Orientation: 0.2910; Line Search: 2.0601
Adding measurement 43953d20 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.977e+03, gradient 6.545e-03, dot -0.224; [a8512086-72db-4ca3-815b-d116f96c328d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.201827975915869, -6.224269586942244, -5.418453060069583, -4.2088341994311875
LBFGS Accumulation History: 3 points
Removed measurement 43953d20 to history. Total: 3
th(0)=-9.201827975915869;dx=-4.280266799676954E-5
Armijo: th(584840.1930352104)=-3.181571073650021; dx=2.2264733047928367E-6 evalInputDelta=-6.020256902265848
New Minimum: -9.201827975915869 > -9.54782745595166
END: th(292420.0965176052)=-9.54782745595166; dx=-4.856630745150639E-6 evalInputDelta=0.3459994800357915
Fitness changed from -9.201827975915869 to -9.54782745595166
Iteration 8 complete. Error: -9.54782745595166 Total: 2.6291; Orientation: 0.2814; Line Search: 1.8121
Adding measurement 6237e81a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.523e+03, gradient 6.520e-03, dot -0.195; [a8512086-72db-4ca3-815b-d116f96c328d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.54782745595166, -6.224269586942244, -5.418453060069583, -4.2088341994311875
LBFGS Accumulation History: 3 points
Removed measurement 6237e81a to history. Total: 3
th(0)=-9.54782745595166;dx=-4.2463757597666225E-5
Armijo: th(630000.0000000002)=-2.355701286006573; dx=3.0034280265769672E-6 evalInputDelta=-7.192126169945087
New Minimum: -9.54782745595166 > -9.730788191237345
END: th(315000.0000000001)=-9.730788191237345; dx=-5.110696134552261E-6 evalInputDelta=0.18296073528568435
Fitness changed from -9.54782745595166 to -9.730788191237345
Iteration 9 complete. Error: -9.730788191237345 Total: 2.7866; Orientation: 0.4650; Line Search: 1.7876
Adding measurement 2290d890 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.146e+04, gradient 6.668e-03, dot -0.188; [a8512086-72db-4ca3-815b-d116f96c328d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.730788191237345, -6.224269586942244, -5.418453060069583, -4.2088341994311875
LBFGS Accumulation History: 3 points
Removed measurement 2290d890 to history. Total: 3
th(0)=-9.730788191237345;dx=-4.442366536166555E-5
Armijo: th(678646.9273600436)=-1.3681748257238642; dx=2.6418608682464442E-6 evalInputDelta=-8.36261336551348
Armijo: th(339323.4636800218)=-9.517175142880909; dx=-4.484474232406688E-6 evalInputDelta=-0.2136130483564358
New Minimum: -9.730788191237345 > -11.658923506206158
END: th(113107.82122667394)=-11.658923506206158; dx=-2.7161754985318088E-5 evalInputDelta=1.928135314968813
Fitness changed from -9.730788191237345 to -11.658923506206158
Iteration 10 complete. Error: -11.658923506206158 Total: 3.2448; Orientation: 0.2958; Line Search: 2.3885
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/3722cf3e-4b46-4bcb-988a-74896f02b75c.jpg)
Adding measurement 6b1dba0b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.001e+04, gradient 5.794e-03, dot -0.231; [a8512086-72db-4ca3-815b-d116f96c328d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -11.658923506206158, -6.224269586942244, -5.418453060069583, -4.2088341994311875
LBFGS Accumulation History: 3 points
Removed measurement 6b1dba0b to history. Total: 3
th(0)=-11.658923506206158;dx=-3.352491460204807E-5
New Minimum: -11.658923506206158 > -12.365110735914943
END: th(243683.41376467102)=-12.365110735914943; dx=-1.3531996026776517E-5 evalInputDelta=0.7061872297087852
Fitness changed from -11.658923506206158 to -12.365110735914943
Iteration 11 complete. Error: -12.365110735914943 Total: 2.2816; Orientation: 0.2758; Line Search: 1.2325
Adding measurement 8bee2f9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.097e+04, gradient 5.976e-03, dot -0.224; [a8512086-72db-4ca3-815b-d116f96c328d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.365110735914943, -6.224269586942244, -5.418453060069583, -4.2088341994311875
LBFGS Accumulation History: 3 points
Removed measurement 8bee2f9 to history. Total: 3
th(0)=-12.365110735914943;dx=-3.568038338469843E-5
Armijo: th(525000.0000000002)=-7.919774271686169; dx=-1.6803709202721868E-6 evalInputDelta=-4.445336464228774
New Minimum: -12.365110735914943 > -12.604218591594844
END: th(262500.0000000001)=-12.604218591594844; dx=-9.99937772037743E-6 evalInputDelta=0.2391078556799009
Fitness changed from -12.365110735914943 to -12.604218591594844
Iteration 12 complete. Error: -12.604218591594844 Total: 2.6755; Orientation: 0.2891; Line Search: 1.8368
Adding measurement d498312 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.607e+04, gradient 6.142e-03, dot -0.212; [a8512086-72db-4ca3-815b-d116f96c328d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.604218591594844, -6.224269586942244, -5.418453060069583, -4.2088341994311875
LBFGS Accumulation History: 3 points
Removed measurement d498312 to history. Total: 3
th(0)=-12.604218591594844;dx=-3.769925918105426E-5
Armijo: th(565539.1061333697)=-6.587865324791871; dx=1.0203590366550208E-6 evalInputDelta=-6.016353266802973
Armijo: th(282769.55306668486)=-12.580727253155544; dx=-7.196078184832786E-6 evalInputDelta=-0.023491338439299625
New Minimum: -12.604218591594844 > -13.84026290810121
END: th(94256.51768889495)=-13.84026290810121; dx=-2.4468052917570286E-5 evalInputDelta=1.2360443165063657
Fitness changed from -12.604218591594844 to -13.84026290810121
Iteration 13 complete. Error: -13.84026290810121 Total: 3.3371; Orientation: 0.3049; Line Search: 2.4813
Adding measurement 1cf520a8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.933e+04, gradient 5.347e-03, dot -0.250; [a8512086-72db-4ca3-815b-d116f96c328d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -13.84026290810121, -6.224269586942244, -5.418453060069583, -4.2088341994311875
LBFGS Accumulation History: 3 points
Removed measurement 1cf520a8 to history. Total: 3
th(0)=-13.84026290810121;dx=-2.8558136498820923E-5
New Minimum: -13.84026290810121 > -14.516718223358403
END: th(203069.51147055917)=-14.516718223358403; dx=-1.558598175577428E-5 evalInputDelta=0.6764553152571935
Fitness changed from -13.84026290810121 to -14.516718223358403
Iteration 14 complete. Error: -14.516718223358403 Total: 2.0670; Orientation: 0.2885; Line Search: 1.2057
Adding measurement 578faa26 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.212e+05, gradient 5.494e-03, dot -0.246; [a8512086-72db-4ca3-815b-d116f96c328d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.516718223358403, -6.224269586942244, -5.418453060069583, -4.2088341994311875
LBFGS Accumulation History: 3 points
Removed measurement 578faa26 to history. Total: 3
th(0)=-14.516718223358403;dx=-3.015286371898094E-5
Armijo: th(437500.00000000023)=-12.105833206348038; dx=-3.878715430304578E-6 evalInputDelta=-2.410885017010365
New Minimum: -14.516718223358403 > -14.917560957971897
END: th(218750.00000000012)=-14.917560957971897; dx=-1.138628024183808E-5 evalInputDelta=0.4008427346134944
Fitness changed from -14.516718223358403 to -14.917560957971897
Iteration 15 complete. Error: -14.917560957971897 Total: 3.0061; Orientation: 0.5113; Line Search: 1.9499
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/86f62d19-5eff-4e54-b7e7-47a61486af85.jpg)
Final threshold in iteration 16: -14.917560957971897 (> -Infinity) after 44.600s (< 5400.000s)
Returns
-14.917560957971897