BasicOptimizer.scala:89 executed in 87.12 seconds (0.960 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: 304194700969300
Reset training subject: 304196424597100
Adding measurement 6b56b894 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-157.69883164493837;dx=-2.8028253819000435E-5
New Minimum: -157.69883164493837 > -157.69887732414523
END: th(2.154434690031884)=-157.69887732414523; dx=-1.7600783098530487E-5 evalInputDelta=4.567920686326943E-5
Fitness changed from -157.69883164493837 to -157.69887732414523
Iteration 1 complete. Error: -157.69887732414523 Total: 8.3970; Orientation: 0.0635; Line Search: 3.2646
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6d4cfc35-9039-45a7-b2ba-44e65376a353.jpg)
Adding measurement 6ae87022 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-157.69887732414523;dx=-1.748223442074423E-5
New Minimum: -157.69887732414523 > -157.69897520811543
WOLFE (weak): th(4.641588833612779)=-157.69897520811543; dx=-1.7457436307922845E-5 evalInputDelta=9.788397019860895E-5
New Minimum: -157.69897520811543 > -157.69906656643278
WOLFE (weak): th(9.283177667225559)=-157.69906656643278; dx=-1.7469547194462062E-5 evalInputDelta=1.8924228754713113E-4
New Minimum: -157.69906656643278 > -157.69941894801826
WOLFE (weak): th(27.849533001676676)=-157.69941894801826; dx=-1.7431803457659626E-5 evalInputDelta=5.416238730333589E-4
New Minimum: -157.69941894801826 > -157.70103075745473
WOLFE (weak): th(111.3981320067067)=-157.70103075745473; dx=-1.7438414842961718E-5 evalInputDelta=0.0021534333095019065
New Minimum: -157.70103075745473 > -157.70962462118916
WOLFE (weak): th(556.9906600335335)=-157.70962462118916; dx=-1.7435226029445867E-5 evalInputDelta=0.010747297043934623
New Minimum: -157.70962462118916 > -157.76332403261833
WOLFE (weak): th(3341.9439602012008)=-157.76332403261833; dx=-1.7409363125420604E-5 evalInputDelta=0.06444670847309908
New Minimum: -157.76332403261833 > -158.14930311354783
WOLFE (weak): th(23393.607721408407)=-158.14930311354783; dx=-1.7359666169682413E-5 evalInputDelta=0.45042578940260114
New Minimum: -158.14930311354783 > -161.2462449817731
WOLFE (weak): th(187148.86177126726)=-161.2462449817731; dx=-1.68187057736412E-5 evalInputDelta=3.547367657627859
New Minimum: -161.2462449817731 > -183.8326618491382
END: th(1684339.7559414054)=-183.8326618491382; dx=-1.0223281517295857E-5 evalInputDelta=26.13378452499296
Fitness changed from -157.69887732414523 to -183.8326618491382
Iteration 2 complete. Error: -183.8326618491382 Total: 18.2926; Orientation: 0.0654; Line Search: 16.4211
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/06fc47f7-c4ee-42c9-ac32-ec1d098dfbb0.jpg)
Adding measurement 32460cc4 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-183.8326618491382;dx=-1.2024010391871681E-5
New Minimum: -183.8326618491382 > -213.83536604795827
END: th(3628800.0000000005)=-213.83536604795827; dx=-4.3044774051163875E-6 evalInputDelta=30.002704198820084
Fitness changed from -183.8326618491382 to -213.83536604795827
Iteration 3 complete. Error: -213.83536604795827 Total: 5.1907; Orientation: 0.0637; Line Search: 3.2829
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/6dce9001-b788-4176-80b0-e2cadf01ef3e.jpg)
Adding measurement 6a944e94 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.275e+04, gradient 3.038e-03, dot -0.419; [9450ede6-786a-4424-a03e-e656a57d0bbd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -213.83536604795827, -183.8326618491382, -157.69887732414523, -157.69883164493837
LBFGS Accumulation History: 3 points
Removed measurement 6a944e94 to history. Total: 3
th(0)=-213.83536604795827;dx=-9.215001035124063E-6
New Minimum: -213.83536604795827 > -238.12818020064964
END: th(7818012.603187701)=-238.12818020064964; dx=-9.168197500758349E-8 evalInputDelta=24.292814152691363
Fitness changed from -213.83536604795827 to -238.12818020064964
Iteration 4 complete. Error: -238.12818020064964 Total: 6.4244; Orientation: 1.1273; Line Search: 3.2421
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/651a5837-ab32-46f1-a8c5-1da04f655d1f.jpg)
Adding measurement 2040c617 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.010e+04, gradient 3.665e-03, dot -0.170; [9450ede6-786a-4424-a03e-e656a57d0bbd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -238.12818020064964, -183.8326618491382, -157.69887732414523, -157.69883164493837
LBFGS Accumulation History: 3 points
Removed measurement 2040c617 to history. Total: 3
th(0)=-238.12818020064964;dx=-1.3405843257205204E-5
Armijo: th(1.6843397559414055E7)=-209.27467825975216; dx=3.206668738293055E-6 evalInputDelta=-28.853501940897473
New Minimum: -238.12818020064964 > -248.51208539069273
WOLF (strong): th(8421698.779707028)=-248.51208539069273; dx=4.2842245292286455E-6 evalInputDelta=10.383905190043095
New Minimum: -248.51208539069273 > -263.3263754254133
END: th(2807232.926569009)=-263.3263754254133; dx=-3.0239799854503512E-6 evalInputDelta=25.19819522476365
Fitness changed from -238.12818020064964 to -263.3263754254133
Iteration 5 complete. Error: -263.3263754254133 Total: 9.6137; Orientation: 1.1136; Line Search: 6.6570
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/2439e771-b75f-4efa-bc66-3fd3f51cbfaa.jpg)
Adding measurement 62a16bb5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.365e+04, gradient 2.481e-03, dot -0.397; [9450ede6-786a-4424-a03e-e656a57d0bbd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -263.3263754254133, -183.8326618491382, -157.69887732414523, -157.69883164493837
LBFGS Accumulation History: 3 points
Removed measurement 62a16bb5 to history. Total: 3
th(0)=-263.3263754254133;dx=-6.134444621152261E-6
New Minimum: -263.3263754254133 > -280.6172379656769
END: th(6048000.000000001)=-280.6172379656769; dx=-2.5385037293763984E-7 evalInputDelta=17.290862540263618
Fitness changed from -263.3263754254133 to -280.6172379656769
Iteration 6 complete. Error: -280.6172379656769 Total: 6.4776; Orientation: 1.1592; Line Search: 3.4978
Adding measurement 22dcb9b0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.390e+04, gradient 2.941e-03, dot -0.269; [9450ede6-786a-4424-a03e-e656a57d0bbd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -280.6172379656769, -183.8326618491382, -157.69887732414523, -157.69883164493837
LBFGS Accumulation History: 3 points
Removed measurement 22dcb9b0 to history. Total: 3
th(0)=-280.6172379656769;dx=-8.624805497720191E-6
Armijo: th(1.3030021005312836E7)=-259.9208773073094; dx=3.184472617173455E-6 evalInputDelta=-20.696360658367496
New Minimum: -280.6172379656769 > -286.8242428754067
WOLF (strong): th(6515010.502656418)=-286.8242428754067; dx=3.2132751744122198E-6 evalInputDelta=6.20700490972979
New Minimum: -286.8242428754067 > -293.766007835477
END: th(2171670.167552139)=-293.766007835477; dx=-2.481595912503558E-6 evalInputDelta=13.148769869800105
Fitness changed from -280.6172379656769 to -293.766007835477
Iteration 7 complete. Error: -293.766007835477 Total: 9.2837; Orientation: 1.0825; Line Search: 6.6442
Adding measurement 6d48e0e7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.244e+04, gradient 1.900e-03, dot -0.488; [9450ede6-786a-4424-a03e-e656a57d0bbd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -293.766007835477, -183.8326618491382, -157.69887732414523, -157.69883164493837
LBFGS Accumulation History: 3 points
Removed measurement 6d48e0e7 to history. Total: 3
th(0)=-293.766007835477;dx=-3.592202444395455E-6
New Minimum: -293.766007835477 > -305.19286976839754
END: th(4678721.544281682)=-305.19286976839754; dx=-1.3224521795323626E-6 evalInputDelta=11.42686193292053
Fitness changed from -293.766007835477 to -305.19286976839754
Iteration 8 complete. Error: -305.19286976839754 Total: 5.9713; Orientation: 1.0743; Line Search: 3.3490
Adding measurement 2b4484b8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.234e+04, gradient 2.042e-03, dot -0.405; [9450ede6-786a-4424-a03e-e656a57d0bbd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -305.19286976839754, -183.8326618491382, -157.69887732414523, -157.69883164493837
LBFGS Accumulation History: 3 points
Removed measurement 2b4484b8 to history. Total: 3
th(0)=-305.19286976839754;dx=-4.16068985687613E-6
New Minimum: -305.19286976839754 > -306.2740090521399
WOLF (strong): th(1.0080000000000002E7)=-306.2740090521399; dx=1.3545024516315588E-6 evalInputDelta=1.0811392837423455
New Minimum: -306.2740090521399 > -312.56739214993956
WOLF (strong): th(5040000.000000001)=-312.56739214993956; dx=3.0605426882386447E-7 evalInputDelta=7.374522381542022
END: th(1680000.0000000002)=-310.6750710774803; dx=-2.0685413699620484E-6 evalInputDelta=5.482201309082768
Fitness changed from -305.19286976839754 to -312.56739214993956
Iteration 9 complete. Error: -312.56739214993956 Total: 9.3916; Orientation: 1.2306; Line Search: 6.5108
Adding measurement 1864d6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.779e+04, gradient 2.389e-03, dot -0.283; [9450ede6-786a-4424-a03e-e656a57d0bbd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -312.56739214993956, -183.8326618491382, -157.69887732414523, -157.69883164493837
LBFGS Accumulation History: 3 points
Removed measurement 1864d6 to history. Total: 3
th(0)=-312.56739214993956;dx=-5.700969907046741E-6
New Minimum: -312.56739214993956 > -321.63765719965147
WOLF (strong): th(3619450.2792535652)=-321.63765719965147; dx=7.132173166604E-7 evalInputDelta=9.070265049711907
END: th(1809725.1396267826)=-320.48645165504274; dx=-2.38765918540806E-6 evalInputDelta=7.919059505103178
Fitness changed from -312.56739214993956 to -321.63765719965147
Iteration 10 complete. Error: -321.63765719965147 Total: 7.7976; Orientation: 1.2102; Line Search: 4.9859
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a0977320-de6f-4d72-aa2b-af612f5ffdb0.jpg)
Final threshold in iteration 11: -321.63765719965147 (> -Infinity) after 87.125s (< 5400.000s)
Returns
-321.63765719965147