Code from BasicOptimizer.scala:88 executed in 138.83 seconds (4.228 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: 1543517537434
Reset training subject: 1546115298422
Adding measurement 2e325cbb to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=13.895426277071238;dx=-4.211356895341711E-6
New Minimum: 13.895426277071238 > 13.895413231104612
WOLFE (weak): th(2.154434690031884)=13.895413231104612; dx=-4.215005672010887E-6 evalInputDelta=1.3045966625213623E-5
New Minimum: 13.895413231104612 > 13.89540009200573
WOLFE (weak): th(4.308869380063768)=13.89540009200573; dx=-4.215701315256048E-6 evalInputDelta=2.6185065507888794E-5
New Minimum: 13.89540009200573 > 13.895346995443106
WOLFE (weak): th(12.926608140191302)=13.895346995443106; dx=-4.214066463124969E-6 evalInputDelta=7.928162813186646E-5
New Minimum: 13.895346995443106 > 13.895108550786972
WOLFE (weak): th(51.70643256076521)=13.895108550786972; dx=-4.212780893761425E-6 evalInputDelta=3.177262842655182E-4
New Minimum: 13.895108550786972 > 13.893836051225662
WOLFE (weak): th(258.53216280382605)=13.893836051225662; dx=-4.212574142719182E-6 evalInputDelta=0.0015902258455753326
New Minimum: 13.893836051225662 > 13.88587049022317
WOLFE (weak): th(1551.1929768229563)=13.88587049022317; dx=-4.230106384991602E-6 evalInputDelta=0.009555786848068237
New Minimum: 13.88587049022317 > 13.827822133898735
WOLFE (weak): th(10858.350837760694)=13.827822133898735; dx=-4.310911019749825E-6 evalInputDelta=0.06760414317250252
New Minimum: 13.827822133898735 > 13.33402869477868
WOLFE (weak): th(86866.80670208555)=13.33402869477868; dx=-4.404850722351173E-6 evalInputDelta=0.5613975822925568
New Minimum: 13.33402869477868 > 9.82982537150383
END: th(781801.26031877)=9.82982537150383; dx=-2.6935869039284014E-6 evalInputDelta=4.065600905567408
Fitness changed from 13.895426277071238 to 9.82982537150383
Iteration 1 complete. Error: 9.82982537150383 Total: 35.9363; Orientation: 0.0183; Line Search: 28.0357
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ec617ef4-5456-446c-bfc9-bd8a40479634.jpg)
Adding measu
...skipping 5973 bytes...
fd72 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.0985672622919083, 4.786367177963257, 9.82982537150383, 13.895426277071238
LBFGS Accumulation History: 3 points
Removed measurement 22d9fe83 to history. Total: 3
th(0)=1.0985672622919083;dx=-8.062147218868075E-8
New Minimum: 1.0985672622919083 > 0.9822681248188019
WOLF (strong): th(5040000.000000001)=0.9822681248188019; dx=8.553565513566117E-9 evalInputDelta=0.11629913747310638
New Minimum: 0.9822681248188019 > 0.9655932933092117
END: th(2520000.0000000005)=0.9655932933092117; dx=-2.6734802677147742E-8 evalInputDelta=0.13297396898269653
Fitness changed from 1.0985672622919083 to 0.9655932933092117
Iteration 9 complete. Error: 0.9655932933092117 Total: 13.5679; Orientation: 0.2668; Line Search: 10.6392
Adding measurement 534e0907 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.384e+03, gradient 3.252e-04, dot -0.475; [50a2e651-f595-413f-9c68-bd2b4adbfd72 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.9655932933092117, 4.786367177963257, 9.82982537150383, 13.895426277071238
LBFGS Accumulation History: 3 points
Removed measurement 534e0907 to history. Total: 3
th(0)=0.9655932933092117;dx=-1.0507532009332914E-7
Armijo: th(5429175.418880348)=1.2929269075393677; dx=1.490037695571598E-7 evalInputDelta=-0.32733361423015594
New Minimum: 0.9655932933092117 > 0.894334465265274
WOLF (strong): th(2714587.709440174)=0.894334465265274; dx=3.766704229095652E-8 evalInputDelta=0.07125882804393768
New Minimum: 0.894334465265274 > 0.8826761245727539
END: th(904862.5698133913)=0.8826761245727539; dx=-5.6307854394527E-8 evalInputDelta=0.08291716873645782
Fitness changed from 0.9655932933092117 to 0.8826761245727539
Iteration 10 complete. Error: 0.8826761245727539 Total: 14.2391; Orientation: 0.2312; Line Search: 10.8740
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f830b3fc-f77e-4ce6-9b2a-aa882e1a384c.jpg)
Final threshold in iteration 11: 0.8826761245727539 (> -Infinity) after 138.828s (< 3600.000s)
0.8826761245727539