Code from BasicOptimizer.scala:88 executed in 119.33 seconds (2.288 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: 1915193766994
Reset training subject: 1917688770506
Adding measurement 312cb5db to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=10.15046201646328;dx=-9.667665214302845E-7
New Minimum: 10.15046201646328 > 10.15045927464962
WOLFE (weak): th(2.154434690031884)=10.15045927464962; dx=-9.562431275056993E-7 evalInputDelta=2.7418136596679688E-6
New Minimum: 10.15045927464962 > 10.150456368923187
WOLFE (weak): th(4.308869380063768)=10.150456368923187; dx=-9.568646610367957E-7 evalInputDelta=5.647540092468262E-6
New Minimum: 10.150456368923187 > 10.150444939732552
WOLFE (weak): th(12.926608140191302)=10.150444939732552; dx=-9.566295187705014E-7 evalInputDelta=1.7076730728149414E-5
New Minimum: 10.150444939732552 > 10.150393962860107
WOLFE (weak): th(51.70643256076521)=10.150393962860107; dx=-9.564623814434718E-7 evalInputDelta=6.805360317230225E-5
New Minimum: 10.150393962860107 > 10.150120854377747
WOLFE (weak): th(258.53216280382605)=10.150120854377747; dx=-9.56861570784924E-7 evalInputDelta=3.411620855331421E-4
New Minimum: 10.150120854377747 > 10.148415461182594
WOLFE (weak): th(1551.1929768229563)=10.148415461182594; dx=-9.56424127839292E-7 evalInputDelta=0.002046555280685425
New Minimum: 10.148415461182594 > 10.136138275265694
WOLFE (weak): th(10858.350837760694)=10.136138275265694; dx=-9.563461817394773E-7 evalInputDelta=0.01432374119758606
New Minimum: 10.136138275265694 > 10.036234229803085
WOLFE (weak): th(86866.80670208555)=10.036234229803085; dx=-9.430451285020495E-7 evalInputDelta=0.1142277866601944
New Minimum: 10.036234229803085 > 9.168600529432297
END: th(781801.26031877)=9.168600529432297; dx=-8.481383524734381E-7 evalInputDelta=0.981861487030983
Fitness changed from 10.15046201646328 to 9.168600529432297
Iteration 1 complete. Error: 9.168600529432297 Total: 32.6336; Orientation: 0.0094; Line Search: 25.2995
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding me
...skipping 5790 bytes...
to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.683e+03, gradient 1.981e-04, dot -0.415; [1d5639e1-c17b-4207-a8b4-073f94c7cda1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.2561287432909012, 7.538538292050362, 9.168600529432297, 10.15046201646328
LBFGS Accumulation History: 3 points
Removed measurement 31f225a6 to history. Total: 3
th(0)=-0.2561287432909012;dx=-3.905628978033526E-8
New Minimum: -0.2561287432909012 > -0.5876098573207855
END: th(1.5120000000000004E7)=-0.5876098573207855; dx=-6.377482536971418E-9 evalInputDelta=0.33148111402988434
Fitness changed from -0.2561287432909012 to -0.5876098573207855
Iteration 9 complete. Error: -0.5876098573207855 Total: 7.8411; Orientation: 0.2174; Line Search: 5.1910
Adding measurement 1ade7fea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.337e+03, gradient 2.065e-04, dot -0.395; [1d5639e1-c17b-4207-a8b4-073f94c7cda1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.5876098573207855, 7.538538292050362, 9.168600529432297, 10.15046201646328
LBFGS Accumulation History: 3 points
Removed measurement 1ade7fea to history. Total: 3
th(0)=-0.5876098573207855;dx=-4.233871062245626E-8
Armijo: th(3.257505251328209E7)=-0.11366237699985504; dx=4.0965564552310696E-8 evalInputDelta=-0.4739474803209305
New Minimum: -0.5876098573207855 > -0.7526500672101974
WOLF (strong): th(1.6287526256641045E7)=-0.7526500672101974; dx=1.7101032182389552E-8 evalInputDelta=0.16504020988941193
New Minimum: -0.7526500672101974 > -0.7873850464820862
END: th(5429175.418880348)=-0.7873850464820862; dx=-1.8162565415723802E-8 evalInputDelta=0.19977518916130066
Fitness changed from -0.5876098573207855 to -0.7873850464820862
Iteration 10 complete. Error: -0.7873850464820862 Total: 13.5379; Orientation: 0.2167; Line Search: 10.7132
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -0.7873850464820862 (> -Infinity) after 119.325s (< 3600.000s)
-0.7873850464820862