Code from BasicOptimizer.scala:88 executed in 534.97 seconds (3.403 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: 7985399784954
Reset training subject: 7997560106915
Adding measurement 2878ed05 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=9.872602012008429;dx=-2.1961413933566845E-6
New Minimum: 9.872602012008429 > 9.872585281729698
WOLFE (weak): th(2.154434690031884)=9.872585281729698; dx=-2.2073203538432785E-6 evalInputDelta=1.6730278730392456E-5
New Minimum: 9.872585281729698 > 9.872569419443607
WOLFE (weak): th(4.308869380063768)=9.872569419443607; dx=-2.200182518179993E-6 evalInputDelta=3.2592564821243286E-5
New Minimum: 9.872569419443607 > 9.87250205874443
WOLFE (weak): th(12.926608140191302)=9.87250205874443; dx=-2.205032619509653E-6 evalInputDelta=9.995326399803162E-5
New Minimum: 9.87250205874443 > 9.872200421988964
WOLFE (weak): th(51.70643256076521)=9.872200421988964; dx=-2.193579564821493E-6 evalInputDelta=4.015900194644928E-4
New Minimum: 9.872200421988964 > 9.870594710111618
WOLFE (weak): th(258.53216280382605)=9.870594710111618; dx=-2.2133436304665023E-6 evalInputDelta=0.0020073018968105316
New Minimum: 9.870594710111618 > 9.860570095479488
WOLFE (weak): th(1551.1929768229563)=9.860570095479488; dx=-2.1625650797604047E-6 evalInputDelta=0.0120319165289402
New Minimum: 9.860570095479488 > 9.79261615127325
WOLFE (weak): th(10858.350837760694)=9.79261615127325; dx=-2.015670233541868E-6 evalInputDelta=0.079985860735178
New Minimum: 9.79261615127325 > 9.312579065561295
END: th(86866.80670208555)=9.312579065561295; dx=-1.5769496673704371E-6 evalInputDelta=0.560022946447134
Fitness changed from 9.872602012008429 to 9.312579065561295
Iteration 1 complete. Error: 9.312579065561295 Total: 144.8361; Orientation: 0.0088; Line Search: 108.4788
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c99f288f-e5a4-4dd2-a54e-6f207a0681f3.jpg)
Adding measurement 7d5a0b44 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=9.312579065561295;dx=-1.6209757621346928E-6
New Minimum: 9.312579065561295 > 8.364153563976288
END: t
...skipping 5392 bytes...
37.1105
Adding measurement 462cc2a2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.097e+03, gradient 5.850e-04, dot -0.240; [85ad5ef5-02c3-4f17-b613-cfb857926169 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.664857104420662, 8.364153563976288, 9.312579065561295, 9.872602012008429
LBFGS Accumulation History: 3 points
Removed measurement 462cc2a2 to history. Total: 3
th(0)=2.664857104420662;dx=-3.274963034315692E-7
Armijo: th(3360000.0000000014)=3.3288906514644623; dx=7.881568304293238E-8 evalInputDelta=-0.6640335470438004
New Minimum: 2.664857104420662 > 2.534509539604187
WOLF (strong): th(1680000.0000000007)=2.534509539604187; dx=6.115148080637441E-8 evalInputDelta=0.13034756481647491
New Minimum: 2.534509539604187 > 2.3000480234622955
END: th(560000.0000000002)=2.3000480234622955; dx=-1.1815487566491056E-7 evalInputDelta=0.3648090809583664
Fitness changed from 2.664857104420662 to 2.3000480234622955
Iteration 9 complete. Error: 2.3000480234622955 Total: 59.6272; Orientation: 0.2448; Line Search: 47.1559
Adding measurement 74abaa84 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.373e+03, gradient 4.113e-04, dot -0.356; [85ad5ef5-02c3-4f17-b613-cfb857926169 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.3000480234622955, 8.364153563976288, 9.312579065561295, 9.872602012008429
LBFGS Accumulation History: 3 points
Removed measurement 74abaa84 to history. Total: 3
th(0)=2.3000480234622955;dx=-1.6202183554937726E-7
New Minimum: 2.3000480234622955 > 1.9711149036884308
END: th(1206483.4264178555)=1.9711149036884308; dx=-6.54316108617165E-8 evalInputDelta=0.32893311977386475
Fitness changed from 2.3000480234622955 to 1.9711149036884308
Iteration 10 complete. Error: 1.9711149036884308 Total: 37.2751; Orientation: 0.2232; Line Search: 25.2977
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/64f4f0c3-a577-4c6f-8cb7-6ded34705ae2.jpg)
Final threshold in iteration 11: 1.9711149036884308 (> -Infinity) after 534.966s (< 1800.000s)
1.9711149036884308