BasicOptimizer.scala:89 executed in 129.43 seconds (1.759 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: 29770591985300
Reset training subject: 29773221916300
Adding measurement 14fa6b10 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-61.189615292987476;dx=-4.6561230413419085E-6
New Minimum: -61.189615292987476 > -61.189620885259586
END: th(2.154434690031884)=-61.189620885259586; dx=-3.212024292920651E-6 evalInputDelta=5.592272110277463E-6
Fitness changed from -61.189615292987476 to -61.189620885259586
Iteration 1 complete. Error: -61.189620885259586 Total: 12.5985; Orientation: 0.0637; Line Search: 5.1425
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7d45a19c-89d8-4321-a8c0-b97227004a14.jpg)
Adding measurement 59c38610 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-61.189620885259586;dx=-3.189613873846482E-6
New Minimum: -61.189620885259586 > -61.18964045820796
WOLFE (weak): th(4.641588833612779)=-61.18964045820796; dx=-3.18691346228694E-6 evalInputDelta=1.9572948374957377E-5
New Minimum: -61.18964045820796 > -61.18965723501587
WOLFE (weak): th(9.283177667225559)=-61.18965723501587; dx=-3.186445502620061E-6 evalInputDelta=3.634975628585835E-5
New Minimum: -61.18965723501587 > -61.189721546070245
WOLFE (weak): th(27.849533001676676)=-61.189721546070245; dx=-3.1833388647163087E-6 evalInputDelta=1.0066081065929211E-4
New Minimum: -61.189721546070245 > -61.190029119743485
WOLFE (weak): th(111.3981320067067)=-61.190029119743485; dx=-3.1830961668485575E-6 evalInputDelta=4.082344838991503E-4
New Minimum: -61.190029119743485 > -61.19165364231553
WOLFE (weak): th(556.9906600335335)=-61.19165364231553; dx=-3.181679262807899E-6 evalInputDelta=0.0020327570559430796
New Minimum: -61.19165364231553 > -61.20179684580101
WOLFE (weak): th(3341.9439602012008)=-61.20179684580101; dx=-3.181726562894079E-6 evalInputDelta=0.012175960541426889
New Minimum: -61.20179684580101 > -61.2747766694515
WOLFE (weak): th(23393.607721408407)=-61.2747766694515; dx=-3.176014572525752E-6 evalInputDelta=0.08515578419191172
New Minimum: -61.2747766694515 > -61.86522635005881
WOLFE (weak): th(187148.86177126726)=-61.86522635005881; dx=-3.120310849996173E-6 evalInputDelta=0.6756054647992258
New Minimum: -61.86522635005881 > -66.64798809090742
END: th(1684339.7559414054)=-66.64798809090742; dx=-2.4233578483944933E-6 evalInputDelta=5.458367205647832
Fitness changed from -61.189620885259586 to -66.64798809090742
Iteration 2 complete. Error: -66.64798809090742 Total: 28.3482; Orientation: 0.0594; Line Search: 25.2939
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/44c57eca-310e-4c5b-ab0d-a2dd769bd874.jpg)
Adding measurement 7261fdc5 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-66.64798809090742;dx=-2.3551099411444446E-6
New Minimum: -66.64798809090742 > -74.00401029494043
END: th(3628800.0000000005)=-74.00401029494043; dx=-1.2693709545733432E-6 evalInputDelta=7.35602220403301
Fitness changed from -66.64798809090742 to -74.00401029494043
Iteration 3 complete. Error: -74.00401029494043 Total: 8.1230; Orientation: 0.0578; Line Search: 5.1189
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/4a5a6577-4627-4d73-b337-5d15ac668596.jpg)
Adding measurement 320d7ffd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.400e+03, gradient 1.219e-03, dot -0.643; [711a968b-f7f8-4b5d-800b-5549bbab4a3c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -74.00401029494043, -66.64798809090742, -61.189620885259586, -61.189615292987476
LBFGS Accumulation History: 3 points
Removed measurement 320d7ffd to history. Total: 3
th(0)=-74.00401029494043;dx=-1.4844833805778929E-6
New Minimum: -74.00401029494043 > -82.36307285619361
END: th(7818012.603187701)=-82.36307285619361; dx=-4.995885083008276E-7 evalInputDelta=8.359062561253182
Fitness changed from -74.00401029494043 to -82.36307285619361
Iteration 4 complete. Error: -82.36307285619361 Total: 9.0202; Orientation: 1.0479; Line Search: 5.0469
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7c5005eb-4a34-46c6-a6ae-a1231437a3bf.jpg)
Adding measurement 1b787678 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.229e+04, gradient 1.303e-03, dot -0.436; [711a968b-f7f8-4b5d-800b-5549bbab4a3c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -82.36307285619361, -66.64798809090742, -61.189620885259586, -61.189615292987476
LBFGS Accumulation History: 3 points
Removed measurement 1b787678 to history. Total: 3
th(0)=-82.36307285619361;dx=-1.695296754988344E-6
Armijo: th(1.6843397559414055E7)=-81.31856225461586; dx=4.90046500734722E-7 evalInputDelta=-1.0445106015777554
New Minimum: -82.36307285619361 > -86.00248908319162
WOLF (strong): th(8421698.779707028)=-86.00248908319162; dx=3.422681562889271E-7 evalInputDelta=3.6394162269980086
New Minimum: -86.00248908319162 > -86.06962547248123
END: th(2807232.926569009)=-86.06962547248123; dx=-6.275745798145817E-7 evalInputDelta=3.706552616287624
Fitness changed from -82.36307285619361 to -86.06962547248123
Iteration 5 complete. Error: -86.06962547248123 Total: 14.7459; Orientation: 1.0257; Line Search: 10.6549
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f6d15b69-6268-468b-a303-0f4d98e5bd10.jpg)
Adding measurement 5a83b353 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.578e+04, gradient 9.793e-04, dot -0.641; [711a968b-f7f8-4b5d-800b-5549bbab4a3c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -86.06962547248123, -66.64798809090742, -61.189620885259586, -61.189615292987476
LBFGS Accumulation History: 3 points
Removed measurement 5a83b353 to history. Total: 3
th(0)=-86.06962547248123;dx=-9.585359979131587E-7
New Minimum: -86.06962547248123 > -90.56327225155611
END: th(6048000.000000001)=-90.56327225155611; dx=-4.3092194466227453E-7 evalInputDelta=4.493646779074879
Fitness changed from -86.06962547248123 to -90.56327225155611
Iteration 6 complete. Error: -90.56327225155611 Total: 9.0254; Orientation: 1.0734; Line Search: 5.0964
Adding measurement 2ab39414 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.144e+04, gradient 1.122e-03, dot -0.530; [711a968b-f7f8-4b5d-800b-5549bbab4a3c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -90.56327225155611, -66.64798809090742, -61.189620885259586, -61.189615292987476
LBFGS Accumulation History: 3 points
Removed measurement 2ab39414 to history. Total: 3
th(0)=-90.56327225155611;dx=-1.2572036131594708E-6
New Minimum: -90.56327225155611 > -91.47491686408156
WOLF (strong): th(1.3030021005312836E7)=-91.47491686408156; dx=3.225652338112435E-7 evalInputDelta=0.9116446125254498
New Minimum: -91.47491686408156 > -93.57769358740643
WOLF (strong): th(6515010.502656418)=-93.57769358740643; dx=1.2663520518620463E-7 evalInputDelta=3.014421335850315
END: th(2171670.167552139)=-92.86332197255005; dx=-6.103790323678285E-7 evalInputDelta=2.3000497209939397
Fitness changed from -90.56327225155611 to -93.57769358740643
Iteration 7 complete. Error: -93.57769358740643 Total: 13.7515; Orientation: 0.9937; Line Search: 10.0721
Adding measurement 24f5652 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.683e+04, gradient 1.361e-03, dot -0.338; [711a968b-f7f8-4b5d-800b-5549bbab4a3c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -93.57769358740643, -66.64798809090742, -61.189620885259586, -61.189615292987476
LBFGS Accumulation History: 3 points
Removed measurement 24f5652 to history. Total: 3
th(0)=-93.57769358740643;dx=-1.8518736297117687E-6
New Minimum: -93.57769358740643 > -97.84824493399132
WOLF (strong): th(4678721.544281682)=-97.84824493399132; dx=2.6600234270118255E-7 evalInputDelta=4.270551346584895
END: th(2339360.772140841)=-97.2348473806422; dx=-8.405761502104993E-7 evalInputDelta=3.6571537932357643
Fitness changed from -93.57769358740643 to -97.84824493399132
Iteration 8 complete. Error: -97.84824493399132 Total: 11.1675; Orientation: 0.9891; Line Search: 7.6543
Adding measurement 187ac925 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.637e+04, gradient 1.140e-03, dot -0.454; [711a968b-f7f8-4b5d-800b-5549bbab4a3c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -97.84824493399132, -66.64798809090742, -61.189620885259586, -61.189615292987476
LBFGS Accumulation History: 3 points
Removed measurement 187ac925 to history. Total: 3
th(0)=-97.84824493399132;dx=-1.2991822652747435E-6
New Minimum: -97.84824493399132 > -100.73740750744281
WOLF (strong): th(5040000.000000001)=-100.73740750744281; dx=2.0035972646903956E-7 evalInputDelta=2.889162573451486
END: th(2520000.0000000005)=-100.44885717782667; dx=-5.038315319456658E-7 evalInputDelta=2.600612243835343
Fitness changed from -97.84824493399132 to -100.73740750744281
Iteration 9 complete. Error: -100.73740750744281 Total: 11.0608; Orientation: 1.0349; Line Search: 7.5915
Adding measurement 147a142 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.607e+04, gradient 1.162e-03, dot -0.417; [711a968b-f7f8-4b5d-800b-5549bbab4a3c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -100.73740750744281, -66.64798809090742, -61.189620885259586, -61.189615292987476
LBFGS Accumulation History: 3 points
Removed measurement 147a142 to history. Total: 3
th(0)=-100.73740750744281;dx=-1.3497013896166993E-6
New Minimum: -100.73740750744281 > -103.29245063473154
WOLF (strong): th(5429175.418880348)=-103.29245063473154; dx=3.7557363637734516E-7 evalInputDelta=2.5550431272887266
New Minimum: -103.29245063473154 > -103.47327486888604
END: th(2714587.709440174)=-103.47327486888604; dx=-3.90277955826608E-7 evalInputDelta=2.7358673614432263
Fitness changed from -100.73740750744281 to -103.47327486888604
Iteration 10 complete. Error: -103.47327486888604 Total: 11.1194; Orientation: 0.9795; Line Search: 7.6283
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e510d48c-aa2c-41b3-909d-621f2922981b.jpg)
Final threshold in iteration 11: -103.47327486888604 (> -Infinity) after 129.426s (< 5400.000s)
Returns
-103.47327486888604