Code from BasicOptimizer.scala:88 executed in 66.45 seconds (2.216 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: 757217117785
Reset training subject: 758714853365
Adding measurement 18fb3153 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=7.361818142235279;dx=-1.7197904797476107E-6
New Minimum: 7.361818142235279 > 7.361811876296997
WOLFE (weak): th(2.154434690031884)=7.361811876296997; dx=-1.7205513570675574E-6 evalInputDelta=6.2659382820129395E-6
New Minimum: 7.361811876296997 > 7.361806347966194
WOLFE (weak): th(4.308869380063768)=7.361806347966194; dx=-1.719746934697638E-6 evalInputDelta=1.179426908493042E-5
New Minimum: 7.361806347966194 > 7.361782178282738
WOLFE (weak): th(12.926608140191302)=7.361782178282738; dx=-1.7192667554321596E-6 evalInputDelta=3.596395254135132E-5
New Minimum: 7.361782178282738 > 7.361675336956978
WOLFE (weak): th(51.70643256076521)=7.361675336956978; dx=-1.7195412767276566E-6 evalInputDelta=1.4280527830123901E-4
New Minimum: 7.361675336956978 > 7.36110407859087
WOLFE (weak): th(258.53216280382605)=7.36110407859087; dx=-1.7182965087593857E-6 evalInputDelta=7.140636444091797E-4
New Minimum: 7.36110407859087 > 7.357533901929855
WOLFE (weak): th(1551.1929768229563)=7.357533901929855; dx=-1.7200943362681385E-6 evalInputDelta=0.004284240305423737
New Minimum: 7.357533901929855 > 7.331907480955124
WOLFE (weak): th(10858.350837760694)=7.331907480955124; dx=-1.7093689926327457E-6 evalInputDelta=0.029910661280155182
New Minimum: 7.331907480955124 > 7.126666612923145
WOLFE (weak): th(86866.80670208555)=7.126666612923145; dx=-1.6456954738875833E-6 evalInputDelta=0.2351515293121338
New Minimum: 7.126666612923145 > 5.648696385324001
END: th(781801.26031877)=5.648696385324001; dx=-1.0360940799398683E-6 evalInputDelta=1.7131217569112778
Fitness changed from 7.361818142235279 to 5.648696385324001
Iteration 1 complete. Error: 5.648696385324001 Total: 18.5733; Orientation: 0.0033; Line Search: 13.2929
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a7deae0b-b3ae-40f1-97b9-52aaf2654529.jpg)
Adding measurement 280
...skipping 5783 bytes...
.4439114332199097
Iteration 8 complete. Error: 1.4439114332199097 Total: 6.8756; Orientation: 0.1929; Line Search: 5.2552
Adding measurement 1af48e2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.526e+03, gradient 3.209e-04, dot -0.572; [ab057f1d-28d6-496e-a816-8a0109df2173 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.4439114332199097, 4.137986123561859, 5.648696385324001, 7.361818142235279
LBFGS Accumulation History: 3 points
Removed measurement 1af48e2 to history. Total: 3
th(0)=1.4439114332199097;dx=-1.0207852015644466E-7
New Minimum: 1.4439114332199097 > 1.2531697452068329
WOLF (strong): th(5040000.000000001)=1.2531697452068329; dx=3.7559700607718076E-9 evalInputDelta=0.19074168801307678
New Minimum: 1.2531697452068329 > 1.2433403730392456
END: th(2520000.0000000005)=1.2433403730392456; dx=-3.848834417097218E-8 evalInputDelta=0.20057106018066406
Fitness changed from 1.4439114332199097 to 1.2433403730392456
Iteration 9 complete. Error: 1.2433403730392456 Total: 5.7965; Orientation: 0.0941; Line Search: 4.3163
Adding measurement 48a7b9b1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.639e+03, gradient 2.587e-04, dot -0.649; [ab057f1d-28d6-496e-a816-8a0109df2173 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.2433403730392456, 4.137986123561859, 5.648696385324001, 7.361818142235279
LBFGS Accumulation History: 3 points
Removed measurement 48a7b9b1 to history. Total: 3
th(0)=1.2433403730392456;dx=-6.64041023585709E-8
New Minimum: 1.2433403730392456 > 1.086162880063057
END: th(5429175.418880348)=1.086162880063057; dx=-1.2416285704451416E-8 evalInputDelta=0.15717749297618866
Fitness changed from 1.2433403730392456 to 1.086162880063057
Iteration 10 complete. Error: 1.086162880063057 Total: 4.0078; Orientation: 0.1035; Line Search: 2.5641
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f47e9d4d-4fcc-4e6e-b946-7b534e9d22ac.jpg)
Final threshold in iteration 11: 1.086162880063057 (> -Infinity) after 66.449s (< 3600.000s)
1.086162880063057