Code from BasicOptimizer.scala:88 executed in 1948.16 seconds (3.386 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: 18873863150445
Reset training subject: 18925977429333
Adding measurement 6ba1fb55 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=2.2142972201108932;dx=-3.7343690041805853E-7
New Minimum: 2.2142972201108932 > 2.2142962962388992
WOLFE (weak): th(2.154434690031884)=2.2142962962388992; dx=-3.730176516941083E-7 evalInputDelta=9.238719940185547E-7
New Minimum: 2.2142962962388992 > 2.2142943292856216
WOLFE (weak): th(4.308869380063768)=2.2142943292856216; dx=-3.7272728889942896E-7 evalInputDelta=2.8908252716064453E-6
New Minimum: 2.2142943292856216 > 2.214289113879204
WOLFE (weak): th(12.926608140191302)=2.214289113879204; dx=-3.7309808417849426E-7 evalInputDelta=8.106231689453125E-6
New Minimum: 2.214289113879204 > 2.2142637073993683
WOLFE (weak): th(51.70643256076521)=2.2142637073993683; dx=-3.8738039224273493E-7 evalInputDelta=3.351271152496338E-5
New Minimum: 2.2142637073993683 > 2.214128702878952
WOLFE (weak): th(258.53216280382605)=2.214128702878952; dx=-3.6857452233789697E-7 evalInputDelta=1.6851723194122314E-4
New Minimum: 2.214128702878952 > 2.213282734155655
WOLFE (weak): th(1551.1929768229563)=2.213282734155655; dx=-3.6854435804550433E-7 evalInputDelta=0.0010144859552383423
New Minimum: 2.213282734155655 > 2.2072046250104904
WOLFE (weak): th(10858.350837760694)=2.2072046250104904; dx=-3.7218993742594707E-7 evalInputDelta=0.007092595100402832
New Minimum: 2.2072046250104904 > 2.1582184433937073
WOLFE (weak): th(86866.80670208555)=2.1582184433937073; dx=-3.6428830413708125E-7 evalInputDelta=0.056078776717185974
New Minimum: 2.1582184433937073 > 1.7797164767980576
END: th(781801.26031877)=1.7797164767980576; dx=-2.630663821356876E-7 evalInputDelta=0.4345807433128357
Fitness changed from 2.2142972201108932 to 1.7797164767980576
Iteration 1 complete. Error: 1.7797164767980576 Total: 665.1641; Orientation: 0.0477; Line Search: 512.8234
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ecdf925c-fc35-44e8-8431-043a4279
...skipping 3914 bytes...
5996608734 Total: 152.7212; Orientation: 1.2593; Line Search: 101.3154
Adding measurement cbfc5f2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.591e+03, gradient 3.540e-04, dot -0.300; [ef5841ff-0ad7-4788-9c0e-af785a8acf1b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.1673355996608734, 1.2653793394565582, 1.7797164767980576, 2.2142972201108932
LBFGS Accumulation History: 3 points
Removed measurement cbfc5f2 to history. Total: 3
th(0)=-0.1673355996608734;dx=-1.2564515951421166E-7
Armijo: th(1.3030021005312834E7)=0.6118167042732239; dx=9.604453727234014E-9 evalInputDelta=-0.7791523039340973
New Minimum: -0.1673355996608734 > -0.19638875126838684
WOLF (strong): th(6515010.502656417)=-0.19638875126838684; dx=7.573478599019533E-9 evalInputDelta=0.029053151607513428
New Minimum: -0.19638875126838684 > -0.42994435131549835
END: th(2171670.167552139)=-0.42994435131549835; dx=-4.601329291129322E-8 evalInputDelta=0.26260875165462494
Fitness changed from -0.1673355996608734 to -0.42994435131549835
Iteration 7 complete. Error: -0.42994435131549835 Total: 256.7999; Orientation: 1.2526; Line Search: 204.3628
Adding measurement 247c7504 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.366e+03, gradient 2.479e-04, dot -0.400; [ef5841ff-0ad7-4788-9c0e-af785a8acf1b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.42994435131549835, 1.2653793394565582, 1.7797164767980576, 2.2142972201108932
LBFGS Accumulation History: 3 points
Removed measurement 247c7504 to history. Total: 3
th(0)=-0.42994435131549835;dx=-6.023347894727715E-8
New Minimum: -0.42994435131549835 > -0.6041097342967987
END: th(4678721.544281682)=-0.6041097342967987; dx=-2.9510233142545993E-8 evalInputDelta=0.17416538298130035
Fitness changed from -0.42994435131549835 to -0.6041097342967987
Iteration 8 complete. Error: -0.6041097342967987 Total: 149.6931; Orientation: 1.3149; Line Search: 98.5616
Final threshold in iteration 8: -0.6041097342967987 (> -Infinity) after 1948.157s (< 1800.000s)
-0.6041097342967987