Code from BasicOptimizer.scala:88 executed in 572.32 seconds (3.446 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: 24443814370339
Reset training subject: 24456782462457
Adding measurement 379a5afc to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=7.348771795630455;dx=-1.4553608434340485E-6
New Minimum: 7.348771795630455 > 7.348761081695557
WOLFE (weak): th(2.154434690031884)=7.348761081695557; dx=-1.452050478799454E-6 evalInputDelta=1.0713934898376465E-5
New Minimum: 7.348761081695557 > 7.348750434815884
WOLFE (weak): th(4.308869380063768)=7.348750434815884; dx=-1.462876433049193E-6 evalInputDelta=2.1360814571380615E-5
New Minimum: 7.348750434815884 > 7.348710618913174
WOLFE (weak): th(12.926608140191302)=7.348710618913174; dx=-1.4567889487009578E-6 evalInputDelta=6.117671728134155E-5
New Minimum: 7.348710618913174 > 7.348528012633324
WOLFE (weak): th(51.70643256076521)=7.348528012633324; dx=-1.4573161502423382E-6 evalInputDelta=2.4378299713134766E-4
New Minimum: 7.348528012633324 > 7.347562953829765
WOLFE (weak): th(258.53216280382605)=7.347562953829765; dx=-1.4297850717819472E-6 evalInputDelta=0.0012088418006896973
New Minimum: 7.347562953829765 > 7.341523110866547
WOLFE (weak): th(1551.1929768229563)=7.341523110866547; dx=-1.431009869267897E-6 evalInputDelta=0.007248684763908386
New Minimum: 7.341523110866547 > 7.297943867743015
WOLFE (weak): th(10858.350837760694)=7.297943867743015; dx=-1.4537431173346942E-6 evalInputDelta=0.05082792788743973
New Minimum: 7.297943867743015 > 6.953071758151054
WOLFE (weak): th(86866.80670208555)=6.953071758151054; dx=-1.34778421256646E-6 evalInputDelta=0.39570003747940063
New Minimum: 6.953071758151054 > 4.881930232048035
END: th(781801.26031877)=4.881930232048035; dx=-4.439111351835968E-7 evalInputDelta=2.4668415635824203
Fitness changed from 7.348771795630455 to 4.881930232048035
Iteration 1 complete. Error: 4.881930232048035 Total: 156.9307; Orientation: 0.0091; Line Search: 119.9882
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5293ba7a-8bb8-43b9-afca-a5c0c4d56e40.jpg)
Adding measureme
...skipping 5897 bytes...
dding measurement 7b1ea409 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.670e+03, gradient 3.169e-04, dot -0.478; [9e8aa971-3b4f-44ff-8a79-5b9b66a2a1ff = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.265831857919693, 3.1181860268115997, 4.881930232048035, 7.348771795630455
LBFGS Accumulation History: 3 points
Removed measurement 7b1ea409 to history. Total: 3
th(0)=-0.265831857919693;dx=-9.535963920138424E-8
Armijo: th(5040000.0)=-0.07194533944129944; dx=3.491612328562432E-8 evalInputDelta=-0.19388651847839355
New Minimum: -0.265831857919693 > -0.4100490212440491
WOLF (strong): th(2520000.0)=-0.4100490212440491; dx=4.449664508599765E-9 evalInputDelta=0.14421716332435608
New Minimum: -0.4100490212440491 > -0.41268280148506165
END: th(840000.0)=-0.41268280148506165; dx=-3.816979706412086E-8 evalInputDelta=0.14685094356536865
Fitness changed from -0.265831857919693 to -0.41268280148506165
Iteration 9 complete. Error: -0.41268280148506165 Total: 65.5482; Orientation: 0.2290; Line Search: 53.2952
Adding measurement 7cc101b0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.735e+03, gradient 2.437e-04, dot -0.564; [9e8aa971-3b4f-44ff-8a79-5b9b66a2a1ff = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.41268280148506165, 3.1181860268115997, 4.881930232048035, 7.348771795630455
LBFGS Accumulation History: 3 points
Removed measurement 7cc101b0 to history. Total: 3
th(0)=-0.41268280148506165;dx=-5.645655769606864E-8
New Minimum: -0.41268280148506165 > -0.5297709703445435
END: th(1809725.1396267824)=-0.5297709703445435; dx=-9.306266338546883E-9 evalInputDelta=0.11708816885948181
Fitness changed from -0.41268280148506165 to -0.5297709703445435
Iteration 10 complete. Error: -0.5297709703445435 Total: 36.1130; Orientation: 0.2283; Line Search: 23.8026
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/28535719-40d1-45ff-9bbd-cae5e4967e39.jpg)
Final threshold in iteration 11: -0.5297709703445435 (> -Infinity) after 572.321s (< 1800.000s)
-0.5297709703445435