Code from BasicOptimizer.scala:88 executed in 662.10 seconds (4.851 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: 9896860233013
Reset training subject: 9912482808899
Adding measurement 6a0b79b8 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=8.371294260025024;dx=-4.2160934349201246E-7
New Minimum: 8.371294260025024 > 8.371294058859348
WOLFE (weak): th(2.154434690031884)=8.371294058859348; dx=-4.2132636486761523E-7 evalInputDelta=2.0116567611694336E-7
New Minimum: 8.371294058859348 > 8.37129283696413
WOLFE (weak): th(4.308869380063768)=8.37129283696413; dx=-4.2132617102249895E-7 evalInputDelta=1.4230608940124512E-6
New Minimum: 8.37129283696413 > 8.371287770569324
WOLFE (weak): th(12.926608140191302)=8.371287770569324; dx=-4.213252801385562E-7 evalInputDelta=6.489455699920654E-6
New Minimum: 8.371287770569324 > 8.371267266571522
WOLFE (weak): th(51.70643256076521)=8.371267266571522; dx=-4.2132485097419613E-7 evalInputDelta=2.699345350265503E-5
New Minimum: 8.371267266571522 > 8.371160328388214
WOLFE (weak): th(258.53216280382605)=8.371160328388214; dx=-4.213008432561253E-7 evalInputDelta=1.3393163681030273E-4
New Minimum: 8.371160328388214 > 8.370490685105324
WOLFE (weak): th(1551.1929768229563)=8.370490685105324; dx=-4.2122388677069296E-7 evalInputDelta=8.035749197006226E-4
New Minimum: 8.370490685105324 > 8.365673020482063
WOLFE (weak): th(10858.350837760694)=8.365673020482063; dx=-4.2072270229196043E-7 evalInputDelta=0.005621239542961121
New Minimum: 8.365673020482063 > 8.326500989496708
WOLFE (weak): th(86866.80670208555)=8.326500989496708; dx=-4.1724349689560544E-7 evalInputDelta=0.0447932705283165
New Minimum: 8.326500989496708 > 7.986078001558781
END: th(781801.26031877)=7.986078001558781; dx=-3.7439737425744504E-7 evalInputDelta=0.38521625846624374
Fitness changed from 8.371294260025024 to 7.986078001558781
Iteration 1 complete. Error: 7.986078001558781 Total: 191.4595; Orientation: 0.0687; Line Search: 147.0729
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a5054216-43b4-49c9-a4eb-b07cce8ca58f.jpg)
Adding measuremen
...skipping 5578 bytes...
rement 41f7fe1f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.458e+03, gradient 1.744e-04, dot -0.392; [a9574349-db58-4d67-b892-a4a6d0a91324 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.1593219637870789, 7.32331420481205, 7.986078001558781, 8.371294260025024
LBFGS Accumulation History: 3 points
Removed measurement 41f7fe1f to history. Total: 3
th(0)=1.1593219637870789;dx=-3.040807454479422E-8
New Minimum: 1.1593219637870789 > 0.9967594817280769
WOLF (strong): th(3.0240000000000004E7)=0.9967594817280769; dx=6.739981240548443E-9 evalInputDelta=0.16256248205900192
New Minimum: 0.9967594817280769 > 0.9095750898122787
END: th(1.5120000000000002E7)=0.9095750898122787; dx=-5.249034714687663E-9 evalInputDelta=0.2497468739748001
Fitness changed from 1.1593219637870789 to 0.9095750898122787
Iteration 9 complete. Error: 0.9095750898122787 Total: 61.2488; Orientation: 1.5859; Line Search: 44.5766
Adding measurement 3aa43cea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.720e+03, gradient 2.011e-04, dot -0.308; [a9574349-db58-4d67-b892-a4a6d0a91324 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.9095750898122787, 7.32331420481205, 7.986078001558781, 8.371294260025024
LBFGS Accumulation History: 3 points
Removed measurement 3aa43cea to history. Total: 3
th(0)=0.9095750898122787;dx=-4.045964844205627E-8
New Minimum: 0.9095750898122787 > 0.7621766924858093
WOLF (strong): th(3.2575052513282087E7)=0.7621766924858093; dx=7.691252597161214E-9 evalInputDelta=0.14739839732646942
END: th(1.6287526256641043E7)=0.7715549767017365; dx=-5.7163896271974155E-9 evalInputDelta=0.1380201131105423
Fitness changed from 0.9095750898122787 to 0.7621766924858093
Iteration 10 complete. Error: 0.7621766924858093 Total: 58.7321; Orientation: 1.7052; Line Search: 42.1030
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/269e63cd-a1fb-496c-b617-5825d3e8d96a.jpg)
Final threshold in iteration 11: 0.7621766924858093 (> -Infinity) after 662.101s (< 3600.000s)
0.7621766924858093