Code from BasicOptimizer.scala:88 executed in 674.55 seconds (6.170 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: 11745253402475
Reset training subject: 11760465934664
Adding measurement 2f27372e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=7.8902213126420975;dx=-4.4979650940301897E-7
New Minimum: 7.8902213126420975 > 7.890221193432808
WOLFE (weak): th(2.154434690031884)=7.890221193432808; dx=-4.494002604698395E-7 evalInputDelta=1.1920928955078125E-7
New Minimum: 7.890221193432808 > 7.890220209956169
WOLFE (weak): th(4.308869380063768)=7.890220209956169; dx=-4.4940036160255645E-7 evalInputDelta=1.1026859283447266E-6
New Minimum: 7.890220209956169 > 7.8902145847678185
WOLFE (weak): th(12.926608140191302)=7.8902145847678185; dx=-4.4939919023687045E-7 evalInputDelta=6.727874279022217E-6
New Minimum: 7.8902145847678185 > 7.8901922181248665
WOLFE (weak): th(51.70643256076521)=7.8901922181248665; dx=-4.494021146990647E-7 evalInputDelta=2.909451723098755E-5
New Minimum: 7.8901922181248665 > 7.890076093375683
WOLFE (weak): th(258.53216280382605)=7.890076093375683; dx=-4.4938884788342474E-7 evalInputDelta=1.4521926641464233E-4
New Minimum: 7.890076093375683 > 7.889350943267345
WOLFE (weak): th(1551.1929768229563)=7.889350943267345; dx=-4.4926197726401743E-7 evalInputDelta=8.703693747520447E-4
New Minimum: 7.889350943267345 > 7.884132198989391
WOLFE (weak): th(10858.350837760694)=7.884132198989391; dx=-4.487448578508159E-7 evalInputDelta=0.006089113652706146
New Minimum: 7.884132198989391 > 7.841717883944511
WOLFE (weak): th(86866.80670208555)=7.841717883944511; dx=-4.442787614710468E-7 evalInputDelta=0.04850342869758606
New Minimum: 7.841717883944511 > 7.475222639739513
END: th(781801.26031877)=7.475222639739513; dx=-3.942991029703862E-7 evalInputDelta=0.4149986729025841
Fitness changed from 7.8902213126420975 to 7.475222639739513
Iteration 1 complete. Error: 7.475222639739513 Total: 190.7062; Orientation: 0.0691; Line Search: 146.7245
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/73076842-816f-4a0d-9d67-260becb16f08.jpg)
Adding
...skipping 5671 bytes...
g measurement 2866ad85 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.267e+03, gradient 2.031e-04, dot -0.362; [a00d2fa9-c2ba-43c4-b0b6-0c7334d01a66 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.9165141209959984, 6.790623053908348, 7.475222639739513, 7.8902213126420975
LBFGS Accumulation History: 3 points
Removed measurement 2866ad85 to history. Total: 3
th(0)=0.9165141209959984;dx=-4.124141050864263E-8
New Minimum: 0.9165141209959984 > 0.605930432677269
WOLF (strong): th(3.0240000000000004E7)=0.605930432677269; dx=1.49538086473454E-9 evalInputDelta=0.3105836883187294
END: th(1.5120000000000002E7)=0.6803319156169891; dx=-1.0927147611863636E-8 evalInputDelta=0.23618220537900925
Fitness changed from 0.9165141209959984 to 0.605930432677269
Iteration 9 complete. Error: 0.605930432677269 Total: 60.3348; Orientation: 1.5942; Line Search: 43.3866
Adding measurement 1393c6a6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.187e+03, gradient 1.889e-04, dot -0.300; [a00d2fa9-c2ba-43c4-b0b6-0c7334d01a66 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.605930432677269, 6.790623053908348, 7.475222639739513, 7.8902213126420975
LBFGS Accumulation History: 3 points
Removed measurement 1393c6a6 to history. Total: 3
th(0)=0.605930432677269;dx=-3.56728204573542E-8
New Minimum: 0.605930432677269 > 0.3317069411277771
WOLF (strong): th(3.2575052513282087E7)=0.3317069411277771; dx=5.644845827807852E-9 evalInputDelta=0.2742234915494919
New Minimum: 0.3317069411277771 > 0.2942987084388733
END: th(1.6287526256641043E7)=0.2942987084388733; dx=-6.378185751461519E-9 evalInputDelta=0.3116317242383957
Fitness changed from 0.605930432677269 to 0.2942987084388733
Iteration 10 complete. Error: 0.2942987084388733 Total: 61.2161; Orientation: 1.5890; Line Search: 45.4497
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f2a3e76e-a24f-467e-b54a-b9f816d89c6d.jpg)
Final threshold in iteration 11: 0.2942987084388733 (> -Infinity) after 674.548s (< 3600.000s)
0.2942987084388733