Code from BasicOptimizer.scala:88 executed in 515.60 seconds (8.099 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: 604793293113500
Reset training subject: 604804475950300
Adding measurement 414422f4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=12.398583337664604;dx=-1.2069963253184096E-6
New Minimum: 12.398583337664604 > 12.398579329252243
WOLFE (weak): th(2.154434690031884)=12.398579329252243; dx=-1.205609628132993E-6 evalInputDelta=4.0084123611450195E-6
New Minimum: 12.398579329252243 > 12.398576140403748
WOLFE (weak): th(4.308869380063768)=12.398576140403748; dx=-1.20579806605001E-6 evalInputDelta=7.197260856628418E-6
New Minimum: 12.398576140403748 > 12.398560851812363
WOLFE (weak): th(12.926608140191302)=12.398560851812363; dx=-1.2056737278393354E-6 evalInputDelta=2.2485852241516113E-5
New Minimum: 12.398560851812363 > 12.398494139313698
WOLFE (weak): th(51.70643256076521)=12.398494139313698; dx=-1.2056713736075301E-6 evalInputDelta=8.919835090637207E-5
New Minimum: 12.398494139313698 > 12.398136004805565
WOLFE (weak): th(258.53216280382605)=12.398136004805565; dx=-1.2056771946898882E-6 evalInputDelta=4.4733285903930664E-4
New Minimum: 12.398136004805565 > 12.395899161696434
WOLFE (weak): th(1551.1929768229563)=12.395899161696434; dx=-1.2056003792862926E-6 evalInputDelta=0.002684175968170166
New Minimum: 12.395899161696434 > 12.379806727170944
WOLFE (weak): th(10858.350837760694)=12.379806727170944; dx=-1.2032088269615946E-6 evalInputDelta=0.018776610493659973
New Minimum: 12.379806727170944 > 12.249317944049835
WOLFE (weak): th(86866.80670208555)=12.249317944049835; dx=-1.1864434561726233E-6 evalInputDelta=0.14926539361476898
New Minimum: 12.249317944049835 > 11.19921001791954
END: th(781801.26031877)=11.19921001791954; dx=-8.861459710028304E-7 evalInputDelta=1.1993733197450638
Fitness changed from 12.398583337664604 to 11.19921001791954
Iteration 1 complete. Error: 11.19921001791954 Total: 142.9386; Orientation: 0.0285; Line Search: 109.9285
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7c
...skipping 5886 bytes...
Error: 3.6683287918567657 Total: 44.4790; Orientation: 0.4041; Line Search: 33.4920
Adding measurement cdd3727 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.376e+03, gradient 3.425e-04, dot -0.425; [e4f81f8c-b8f7-43ac-9318-be84de893279 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.6683287918567657, 9.684481143951416, 11.19921001791954, 12.398583337664604
LBFGS Accumulation History: 3 points
Removed measurement cdd3727 to history. Total: 3
th(0)=3.6683287918567657;dx=-1.1718519075931383E-7
New Minimum: 3.6683287918567657 > 3.4045206904411316
WOLF (strong): th(5040000.000000001)=3.4045206904411316; dx=1.7497613730163323E-8 evalInputDelta=0.26380810141563416
New Minimum: 3.4045206904411316 > 3.3888115882873535
END: th(2520000.0000000005)=3.3888115882873535; dx=-3.683840161170753E-8 evalInputDelta=0.27951720356941223
Fitness changed from 3.6683287918567657 to 3.3888115882873535
Iteration 9 complete. Error: 3.3888115882873535 Total: 44.4483; Orientation: 0.3966; Line Search: 32.4812
Adding measurement 204aa76d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.589e+03, gradient 2.665e-04, dot -0.515; [e4f81f8c-b8f7-43ac-9318-be84de893279 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.3888115882873535, 9.684481143951416, 11.19921001791954, 12.398583337664604
LBFGS Accumulation History: 3 points
Removed measurement 204aa76d to history. Total: 3
th(0)=3.3888115882873535;dx=-7.095642616166744E-8
New Minimum: 3.3888115882873535 > 3.1713233590126038
END: th(5429175.418880348)=3.1713233590126038; dx=-1.0332130024196822E-8 evalInputDelta=0.21748822927474976
Fitness changed from 3.3888115882873535 to 3.1713233590126038
Iteration 10 complete. Error: 3.1713233590126038 Total: 33.9259; Orientation: 0.4033; Line Search: 21.8128
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/618e4486-fab9-4aeb-b62e-46fba3247ef8.jpg)
Final threshold in iteration 11: 3.1713233590126038 (> -Infinity) after 515.601s (< 3600.000s)
3.1713233590126038