BasicOptimizer.scala:89 executed in 122.79 seconds (1.813 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: 332512707103500
Reset training subject: 332515383037500
Adding measurement 6b8c6ec8 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-97.42031023779377;dx=-2.2414826704913662E-5
New Minimum: -97.42031023779377 > -97.42035973938277
END: th(2.154434690031884)=-97.42035973938277; dx=-1.9618357667518847E-5 evalInputDelta=4.950158900385304E-5
Fitness changed from -97.42031023779377 to -97.42035973938277
Iteration 1 complete. Error: -97.42035973938277 Total: 12.6063; Orientation: 0.0609; Line Search: 5.0055
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/1e46f498-c6d3-47bc-bc9f-0c373535e8ac.jpg)
Adding measurement 250656f5 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-97.42035973938277;dx=-1.9555445919754767E-5
New Minimum: -97.42035973938277 > -97.42045874248531
WOLFE (weak): th(4.641588833612779)=-97.42045874248531; dx=-1.955508168625666E-5 evalInputDelta=9.900310253385669E-5
New Minimum: -97.42045874248531 > -97.42056269563469
WOLFE (weak): th(9.283177667225559)=-97.42056269563469; dx=-1.955458784829177E-5 evalInputDelta=2.02956251911246E-4
New Minimum: -97.42056269563469 > -97.42096365674325
WOLFE (weak): th(27.849533001676676)=-97.42096365674325; dx=-1.9554608609419798E-5 evalInputDelta=6.039173604790449E-4
New Minimum: -97.42096365674325 > -97.42279023646641
WOLFE (weak): th(111.3981320067067)=-97.42279023646641; dx=-1.955501276920547E-5 evalInputDelta=0.002430497083636851
New Minimum: -97.42279023646641 > -97.4325264671224
WOLFE (weak): th(556.9906600335335)=-97.4325264671224; dx=-1.9547932796277853E-5 evalInputDelta=0.012166727739625571
New Minimum: -97.4325264671224 > -97.49334722343794
WOLFE (weak): th(3341.9439602012008)=-97.49334722343794; dx=-1.9523116149431174E-5 evalInputDelta=0.07298748405516164
New Minimum: -97.49334722343794 > -97.92807136634893
WOLFE (weak): th(23393.607721408407)=-97.92807136634893; dx=-1.926411030601375E-5 evalInputDelta=0.5077116269661559
New Minimum: -97.92807136634893 > -101.2736635471367
END: th(187148.86177126726)=-101.2736635471367; dx=-1.738398599832883E-5 evalInputDelta=3.8533038077539317
Fitness changed from -97.42035973938277 to -101.2736635471367
Iteration 2 complete. Error: -101.2736635471367 Total: 26.2415; Orientation: 0.0600; Line Search: 23.0710
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/c01c09b0-8b4b-4f17-9316-7ec04747ef08.jpg)
Adding measurement 359c9b80 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-101.2736635471367;dx=-1.6554239581176273E-5
New Minimum: -101.2736635471367 > -107.98203734741695
END: th(403200.00000000006)=-107.98203734741695; dx=-1.3298659713638881E-5 evalInputDelta=6.708373800280242
Fitness changed from -101.2736635471367 to -107.98203734741695
Iteration 3 complete. Error: -107.98203734741695 Total: 8.3147; Orientation: 0.0601; Line Search: 5.1206
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/13cd315c-b3c4-46ae-a629-83a283169b72.jpg)
Adding measurement 1b5bd686 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.152e+03, gradient 3.506e-03, dot -0.918; [d6b31e32-91f3-44e1-8648-420f403db99e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -107.98203734741695, -101.2736635471367, -97.42035973938277, -97.42031023779377
LBFGS Accumulation History: 3 points
Removed measurement 1b5bd686 to history. Total: 3
th(0)=-107.98203734741695;dx=-1.228148638856796E-5
New Minimum: -107.98203734741695 > -118.12585144903551
END: th(868668.0670208557)=-118.12585144903551; dx=-8.737785130611605E-6 evalInputDelta=10.14381410161856
Fitness changed from -107.98203734741695 to -118.12585144903551
Iteration 4 complete. Error: -118.12585144903551 Total: 9.5844; Orientation: 1.0351; Line Search: 5.3134
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/68366f04-ca47-4c82-8456-a6c577efc0e3.jpg)
Adding measurement 161a9199 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.786e+03, gradient 2.913e-03, dot -0.809; [d6b31e32-91f3-44e1-8648-420f403db99e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -118.12585144903551, -101.2736635471367, -97.42035973938277, -97.42031023779377
LBFGS Accumulation History: 3 points
Removed measurement 161a9199 to history. Total: 3
th(0)=-118.12585144903551;dx=-8.467567859908393E-6
New Minimum: -118.12585144903551 > -132.4205738876146
END: th(1871488.617712673)=-132.4205738876146; dx=-5.416054120702226E-6 evalInputDelta=14.2947224385791
Fitness changed from -118.12585144903551 to -132.4205738876146
Iteration 5 complete. Error: -132.4205738876146 Total: 9.1392; Orientation: 1.0028; Line Search: 5.1894
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/6d239b2b-b805-41c3-bbac-a579395e89c0.jpg)
Adding measurement a63c0bd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.845e+03, gradient 2.547e-03, dot -0.694; [d6b31e32-91f3-44e1-8648-420f403db99e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -132.4205738876146, -101.2736635471367, -97.42035973938277, -97.42031023779377
LBFGS Accumulation History: 3 points
Removed measurement a63c0bd to history. Total: 3
th(0)=-132.4205738876146;dx=-6.471877354919843E-6
New Minimum: -132.4205738876146 > -150.5658480758249
END: th(4032000.0000000014)=-150.5658480758249; dx=-2.358860481255523E-6 evalInputDelta=18.145274188210294
Fitness changed from -132.4205738876146 to -150.5658480758249
Iteration 6 complete. Error: -150.5658480758249 Total: 9.0923; Orientation: 0.9907; Line Search: 5.0589
Adding measurement f51eafd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.042e+04, gradient 2.809e-03, dot -0.416; [d6b31e32-91f3-44e1-8648-420f403db99e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -150.5658480758249, -101.2736635471367, -97.42035973938277, -97.42031023779377
LBFGS Accumulation History: 3 points
Removed measurement f51eafd to history. Total: 3
th(0)=-150.5658480758249;dx=-7.884744252210504E-6
Armijo: th(8686680.670208558)=-148.8589087611931; dx=2.42814349075662E-6 evalInputDelta=-1.7069393146317964
New Minimum: -150.5658480758249 > -159.11910218652022
WOLF (strong): th(4343340.335104279)=-159.11910218652022; dx=1.2655121481425658E-6 evalInputDelta=8.55325411069532
END: th(1447780.1117014263)=-158.76333992219335; dx=-2.653049196715175E-6 evalInputDelta=8.19749184636845
Fitness changed from -150.5658480758249 to -159.11910218652022
Iteration 7 complete. Error: -159.11910218652022 Total: 13.7409; Orientation: 0.9612; Line Search: 10.2410
Adding measurement 4170cd79 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.303e+03, gradient 3.477e-03, dot -0.217; [d6b31e32-91f3-44e1-8648-420f403db99e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -159.11910218652022, -101.2736635471367, -97.42035973938277, -97.42031023779377
LBFGS Accumulation History: 3 points
Removed measurement 4170cd79 to history. Total: 3
th(0)=-159.11910218652022;dx=-1.208648792798314E-5
New Minimum: -159.11910218652022 > -172.1452654132484
WOLF (strong): th(3119147.6961877886)=-172.1452654132484; dx=2.8660014044479226E-6 evalInputDelta=13.026163226728187
New Minimum: -172.1452654132484 > -172.59181060372768
END: th(1559573.8480938943)=-172.59181060372768; dx=-3.298991608909859E-6 evalInputDelta=13.472708417207457
Fitness changed from -159.11910218652022 to -172.59181060372768
Iteration 8 complete. Error: -172.59181060372768 Total: 11.1528; Orientation: 0.9800; Line Search: 7.6395
Adding measurement 322a141 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.803e+04, gradient 2.179e-03, dot -0.522; [d6b31e32-91f3-44e1-8648-420f403db99e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -172.59181060372768, -101.2736635471367, -97.42035973938277, -97.42031023779377
LBFGS Accumulation History: 3 points
Removed measurement 322a141 to history. Total: 3
th(0)=-172.59181060372768;dx=-4.742329037619508E-6
New Minimum: -172.59181060372768 > -182.4869629497741
END: th(3360000.0000000014)=-182.4869629497741; dx=-9.74289187728379E-7 evalInputDelta=9.895152346046416
Fitness changed from -172.59181060372768 to -182.4869629497741
Iteration 9 complete. Error: -182.4869629497741 Total: 8.4244; Orientation: 0.9780; Line Search: 4.9974
Adding measurement 2c4db25c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.994e+04, gradient 2.373e-03, dot -0.437; [d6b31e32-91f3-44e1-8648-420f403db99e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -182.4869629497741, -101.2736635471367, -97.42035973938277, -97.42031023779377
LBFGS Accumulation History: 3 points
Removed measurement 2c4db25c to history. Total: 3
th(0)=-182.4869629497741;dx=-5.6219872387175345E-6
Armijo: th(7238900.558507132)=-180.32271917985855; dx=2.286779860608129E-6 evalInputDelta=-2.1642437699155437
New Minimum: -182.4869629497741 > -188.33388169542528
WOLF (strong): th(3619450.279253566)=-188.33388169542528; dx=1.0810839659122825E-6 evalInputDelta=5.84691874565118
END: th(1206483.4264178553)=-187.77024074122986; dx=-2.4100763649357023E-6 evalInputDelta=5.28327779145576
Fitness changed from -182.4869629497741 to -188.33388169542528
Iteration 10 complete. Error: -188.33388169542528 Total: 13.9068; Orientation: 0.9853; Line Search: 10.3042
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/bd215d5b-abae-4057-afe4-42c0cb606077.jpg)
Final threshold in iteration 11: -188.33388169542528 (> -Infinity) after 122.792s (< 5400.000s)
Returns
-188.33388169542528