BasicOptimizer.scala:89 executed in 94.92 seconds (1.232 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: 283907347640400
Reset training subject: 283909449261400
Adding measurement 5e04e6b2 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-52.61246285776518;dx=-4.742332918667768E-6
New Minimum: -52.61246285776518 > -52.612468201175034
END: th(2.154434690031884)=-52.612468201175034; dx=-3.3433762302920616E-6 evalInputDelta=5.3434098532534335E-6
Fitness changed from -52.61246285776518 to -52.612468201175034
Iteration 1 complete. Error: -52.612468201175034 Total: 9.7454; Orientation: 0.0580; Line Search: 3.9594
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/329ed265-40c7-4998-8bdd-c3f541595222.jpg)
Adding measurement 52ffe128 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-52.612468201175034;dx=-3.3433930167311234E-6
New Minimum: -52.612468201175034 > -52.61248601253728
WOLFE (weak): th(4.641588833612779)=-52.61248601253728; dx=-3.3433867572052905E-6 evalInputDelta=1.7811362248210116E-5
New Minimum: -52.61248601253728 > -52.6125038238935
WOLFE (weak): th(9.283177667225559)=-52.6125038238935; dx=-3.3433904708258694E-6 evalInputDelta=3.5622718463912406E-5
New Minimum: -52.6125038238935 > -52.612562601326246
WOLFE (weak): th(27.849533001676676)=-52.612562601326246; dx=-3.3433752797157194E-6 evalInputDelta=9.440015121242595E-5
New Minimum: -52.612562601326246 > -52.61284223851602
WOLFE (weak): th(111.3981320067067)=-52.61284223851602; dx=-3.3433741165464732E-6 evalInputDelta=3.740373409897302E-4
New Minimum: -52.61284223851602 > -52.614333018069594
WOLFE (weak): th(556.9906600335335)=-52.614333018069594; dx=-3.343151666426346E-6 evalInputDelta=0.001864816894560306
New Minimum: -52.614333018069594 > -52.623643645987265
WOLFE (weak): th(3341.9439602012008)=-52.623643645987265; dx=-3.342393937389307E-6 evalInputDelta=0.011175444812231206
New Minimum: -52.623643645987265 > -52.69059496306445
WOLFE (weak): th(23393.607721408407)=-52.69059496306445; dx=-3.3354306321218326E-6 evalInputDelta=0.07812676188941481
New Minimum: -52.69059496306445 > -53.2315873658686
WOLFE (weak): th(187148.86177126726)=-53.2315873658686; dx=-3.2709631611734997E-6 evalInputDelta=0.619119164693565
New Minimum: -53.2315873658686 > -57.65466575663543
END: th(1684339.7559414054)=-57.65466575663543; dx=-2.619001208410228E-6 evalInputDelta=5.0421975554603975
Fitness changed from -52.612468201175034 to -57.65466575663543
Iteration 2 complete. Error: -57.65466575663543 Total: 21.3005; Orientation: 0.0590; Line Search: 19.1004
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/9b8d0cbc-0b32-402c-902a-5826dede0070.jpg)
Adding measurement 29b3e8ec to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-57.65466575663543;dx=-2.3460508932571113E-6
New Minimum: -57.65466575663543 > -64.54771842086762
END: th(3628800.0000000005)=-64.54771842086762; dx=-1.4491327438565118E-6 evalInputDelta=6.893052664232194
Fitness changed from -57.65466575663543 to -64.54771842086762
Iteration 3 complete. Error: -64.54771842086762 Total: 6.1592; Orientation: 0.0623; Line Search: 3.8451
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/354eda69-ef55-4fad-a450-ce73213c0d35.jpg)
Adding measurement 4e29838e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.218e+03, gradient 1.192e-03, dot -0.761; [e943338f-225c-43ed-9db9-8e86982cd0fb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.54771842086762, -57.65466575663543, -52.612468201175034, -52.61246285776518
LBFGS Accumulation History: 3 points
Removed measurement 4e29838e to history. Total: 3
th(0)=-64.54771842086762;dx=-1.4208425564376164E-6
New Minimum: -64.54771842086762 > -72.52976308355846
END: th(7818012.603187701)=-72.52976308355846; dx=-6.646302919842642E-7 evalInputDelta=7.982044662690839
Fitness changed from -64.54771842086762 to -72.52976308355846
Iteration 4 complete. Error: -72.52976308355846 Total: 7.1450; Orientation: 1.0297; Line Search: 4.0039
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/f843fa8b-acb7-4cc2-b7e9-f7aba2e0cee0.jpg)
Adding measurement 5706a36 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.260e+03, gradient 1.056e-03, dot -0.535; [e943338f-225c-43ed-9db9-8e86982cd0fb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.52976308355846, -57.65466575663543, -52.612468201175034, -52.61246285776518
LBFGS Accumulation History: 3 points
Removed measurement 5706a36 to history. Total: 3
th(0)=-72.52976308355846;dx=-1.1142772581337943E-6
New Minimum: -72.52976308355846 > -78.96022955766958
END: th(1.6843397559414055E7)=-78.96022955766958; dx=-1.9838952116185995E-8 evalInputDelta=6.430466474111114
Fitness changed from -72.52976308355846 to -78.96022955766958
Iteration 5 complete. Error: -78.96022955766958 Total: 6.9664; Orientation: 1.0260; Line Search: 3.8302
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/30c9c9de-7a7b-4670-9c28-9a7136b8c6e3.jpg)
Adding measurement ba9b007 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.648e+03, gradient 1.348e-03, dot -0.198; [e943338f-225c-43ed-9db9-8e86982cd0fb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.96022955766958, -57.65466575663543, -52.612468201175034, -52.61246285776518
LBFGS Accumulation History: 3 points
Removed measurement ba9b007 to history. Total: 3
th(0)=-78.96022955766958;dx=-1.816278349402556E-6
Armijo: th(3.628800000000001E7)=-71.66001031778133; dx=4.0386314546143E-7 evalInputDelta=-7.30021923988825
New Minimum: -78.96022955766958 > -81.30701776950953
WOLF (strong): th(1.8144000000000004E7)=-81.30701776950953; dx=6.506873616774839E-7 evalInputDelta=2.34678821183995
New Minimum: -81.30701776950953 > -85.87908662921856
END: th(6048000.000000001)=-85.87908662921856; dx=-3.9912081447884036E-7 evalInputDelta=6.9188570715489845
Fitness changed from -78.96022955766958 to -85.87908662921856
Iteration 6 complete. Error: -85.87908662921856 Total: 10.9515; Orientation: 0.9764; Line Search: 7.6321
Adding measurement 2e185cc0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.715e+04, gradient 8.960e-04, dot -0.488; [e943338f-225c-43ed-9db9-8e86982cd0fb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -85.87908662921856, -57.65466575663543, -52.612468201175034, -52.61246285776518
LBFGS Accumulation History: 3 points
Removed measurement 2e185cc0 to history. Total: 3
th(0)=-85.87908662921856;dx=-8.027555384681726E-7
New Minimum: -85.87908662921856 > -90.54605854124627
END: th(1.3030021005312836E7)=-90.54605854124627; dx=-2.9290106470222417E-8 evalInputDelta=4.666971912027705
Fitness changed from -85.87908662921856 to -90.54605854124627
Iteration 7 complete. Error: -90.54605854124627 Total: 6.6518; Orientation: 1.0383; Line Search: 3.7573
Adding measurement 23d0370c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.934e+04, gradient 1.096e-03, dot -0.341; [e943338f-225c-43ed-9db9-8e86982cd0fb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -90.54605854124627, -57.65466575663543, -52.612468201175034, -52.61246285776518
LBFGS Accumulation History: 3 points
Removed measurement 23d0370c to history. Total: 3
th(0)=-90.54605854124627;dx=-1.2022205931585514E-6
Armijo: th(2.8072329265690096E7)=-86.59710961566648; dx=3.983355514928119E-7 evalInputDelta=-3.948948925579785
New Minimum: -90.54605854124627 > -92.97070228099886
WOLF (strong): th(1.4036164632845048E7)=-92.97070228099886; dx=4.4502161375038355E-7 evalInputDelta=2.4246437397525966
New Minimum: -92.97070228099886 > -94.40929317529705
END: th(4678721.544281683)=-94.40929317529705; dx=-4.06111912704354E-7 evalInputDelta=3.8632346340507837
Fitness changed from -90.54605854124627 to -94.40929317529705
Iteration 8 complete. Error: -94.40929317529705 Total: 10.4589; Orientation: 1.0285; Line Search: 7.5525
Adding measurement 6b693081 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.672e+04, gradient 7.116e-04, dot -0.616; [e943338f-225c-43ed-9db9-8e86982cd0fb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -94.40929317529705, -57.65466575663543, -52.612468201175034, -52.61246285776518
LBFGS Accumulation History: 3 points
Removed measurement 6b693081 to history. Total: 3
th(0)=-94.40929317529705;dx=-5.063493331178924E-7
New Minimum: -94.40929317529705 > -97.98317743268811
END: th(1.0080000000000004E7)=-97.98317743268811; dx=-2.313538238272314E-7 evalInputDelta=3.5738842573910574
Fitness changed from -94.40929317529705 to -97.98317743268811
Iteration 9 complete. Error: -97.98317743268811 Total: 6.6963; Orientation: 1.1013; Line Search: 3.7508
Adding measurement 3eca338e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.912e+04, gradient 7.740e-04, dot -0.529; [e943338f-225c-43ed-9db9-8e86982cd0fb = 1.000/1.000e+00]
Orientation rejected. Popping history element from -97.98317743268811, -57.65466575663543, -52.612468201175034, -52.61246285776518
LBFGS Accumulation History: 3 points
Removed measurement 3eca338e to history. Total: 3
th(0)=-97.98317743268811;dx=-5.99085601923022E-7
New Minimum: -97.98317743268811 > -100.33553643744995
WOLF (strong): th(2.1716701675521396E7)=-100.33553643744995; dx=9.740370729423229E-8 evalInputDelta=2.352359004761837
New Minimum: -100.33553643744995 > -100.85102796393727
END: th(1.0858350837760698E7)=-100.85102796393727; dx=-3.3081636028555765E-8 evalInputDelta=2.867850531249161
Fitness changed from -97.98317743268811 to -100.85102796393727
Iteration 10 complete. Error: -100.85102796393727 Total: 8.5306; Orientation: 1.0028; Line Search: 5.7398
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/95f0d9d8-83f4-41cb-9436-1e826c8643cb.jpg)
Final threshold in iteration 11: -100.85102796393727 (> -Infinity) after 94.915s (< 5400.000s)
Returns
-100.85102796393727