Code from BasicOptimizer.scala:88 executed in 582.01 seconds (3.406 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: 14521742227698
Reset training subject: 14533737318777
Adding measurement 7501921a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=10.719287235289812;dx=-1.026464772625605E-6
New Minimum: 10.719287235289812 > 10.71927946060896
WOLFE (weak): th(2.154434690031884)=10.71927946060896; dx=-1.045372681635208E-6 evalInputDelta=7.774680852890015E-6
New Minimum: 10.71927946060896 > 10.71927259862423
WOLFE (weak): th(4.308869380063768)=10.71927259862423; dx=-1.0461814892598393E-6 evalInputDelta=1.463666558265686E-5
New Minimum: 10.71927259862423 > 10.719243992120028
WOLFE (weak): th(12.926608140191302)=10.719243992120028; dx=-1.0305428431048131E-6 evalInputDelta=4.32431697845459E-5
New Minimum: 10.719243992120028 > 10.719114281237125
WOLFE (weak): th(51.70643256076521)=10.719114281237125; dx=-1.038133044235008E-6 evalInputDelta=1.7295405268669128E-4
New Minimum: 10.719114281237125 > 10.718421328812838
WOLFE (weak): th(258.53216280382605)=10.718421328812838; dx=-1.043707461043884E-6 evalInputDelta=8.659064769744873E-4
New Minimum: 10.718421328812838 > 10.714005932211876
WOLFE (weak): th(1551.1929768229563)=10.714005932211876; dx=-9.982109657336E-7 evalInputDelta=0.0052813030779361725
New Minimum: 10.714005932211876 > 10.683010254055262
WOLFE (weak): th(10858.350837760694)=10.683010254055262; dx=-1.0084046134282337E-6 evalInputDelta=0.036276981234550476
New Minimum: 10.683010254055262 > 10.43515421077609
WOLFE (weak): th(86866.80670208555)=10.43515421077609; dx=-9.555705478458164E-7 evalInputDelta=0.28413302451372147
New Minimum: 10.43515421077609 > 8.743033330887556
END: th(781801.26031877)=8.743033330887556; dx=-5.658551153262793E-7 evalInputDelta=1.976253904402256
Fitness changed from 10.719287235289812 to 8.743033330887556
Iteration 1 complete. Error: 8.743033330887556 Total: 157.2087; Orientation: 0.0096; Line Search: 120.3930
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/cbebf316-5518-48ed-a1bb-359115cd0a42.jpg)
Addin
...skipping 6031 bytes...
39551544 Total: 36.5066; Orientation: 0.3297; Line Search: 23.8895
Adding measurement 68b50197 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.842e+03, gradient 3.325e-04, dot -0.510; [5fed8e01-30c5-4c5e-bc7d-fff69df214a6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.698412239551544, 6.6617382019758224, 8.743033330887556, 10.719287235289812
LBFGS Accumulation History: 3 points
Removed measurement 68b50197 to history. Total: 3
th(0)=2.698412239551544;dx=-1.0659503349947811E-7
New Minimum: 2.698412239551544 > 2.567518264055252
END: th(2520000.0000000005)=2.567518264055252; dx=-8.353848998154777E-9 evalInputDelta=0.13089397549629211
Fitness changed from 2.698412239551544 to 2.567518264055252
Iteration 9 complete. Error: 2.567518264055252 Total: 36.6257; Orientation: 0.2221; Line Search: 24.2243
Adding measurement 7e368e2f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.761e+03, gradient 4.997e-04, dot -0.365; [5fed8e01-30c5-4c5e-bc7d-fff69df214a6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.567518264055252, 6.6617382019758224, 8.743033330887556, 10.719287235289812
LBFGS Accumulation History: 3 points
Removed measurement 7e368e2f to history. Total: 3
th(0)=2.567518264055252;dx=-2.3884599562408215E-7
Armijo: th(5429175.418880348)=3.4857232570648193; dx=7.611034371254309E-8 evalInputDelta=-0.9182049930095673
Armijo: th(2714587.709440174)=2.6255655735731125; dx=6.420528935244862E-8 evalInputDelta=-0.05804730951786041
New Minimum: 2.567518264055252 > 2.2278758734464645
END: th(904862.5698133913)=2.2278758734464645; dx=-2.6016811943006115E-8 evalInputDelta=0.33964239060878754
Fitness changed from 2.567518264055252 to 2.2278758734464645
Iteration 10 complete. Error: 2.2278758734464645 Total: 61.1193; Orientation: 0.2261; Line Search: 48.9924
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/fd44cc95-b88d-4336-8f3a-ec87d7eb3f2c.jpg)
Final threshold in iteration 11: 2.2278758734464645 (> -Infinity) after 582.007s (< 1800.000s)
2.2278758734464645