Code from BasicOptimizer.scala:88 executed in 787.03 seconds (3.356 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: 1284084549652
Reset training subject: 1301144850863
Adding measurement 1de58065 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=5.310322880744934;dx=-1.2103718964664858E-6
New Minimum: 5.310322880744934 > 5.310317903757095
WOLFE (weak): th(2.154434690031884)=5.310317903757095; dx=-1.2053019499619007E-6 evalInputDelta=4.976987838745117E-6
New Minimum: 5.310317903757095 > 5.3103132247924805
WOLFE (weak): th(4.308869380063768)=5.3103132247924805; dx=-1.2051802219793717E-6 evalInputDelta=9.655952453613281E-6
New Minimum: 5.3103132247924805 > 5.310294806957245
WOLFE (weak): th(12.926608140191302)=5.310294806957245; dx=-1.2027290542324998E-6 evalInputDelta=2.8073787689208984E-5
New Minimum: 5.310294806957245 > 5.310210019350052
WOLFE (weak): th(51.70643256076521)=5.310210019350052; dx=-1.2015346864076915E-6 evalInputDelta=1.1286139488220215E-4
New Minimum: 5.310210019350052 > 5.3097571432590485
WOLFE (weak): th(258.53216280382605)=5.3097571432590485; dx=-1.2037640580711282E-6 evalInputDelta=5.657374858856201E-4
New Minimum: 5.3097571432590485 > 5.306927502155304
WOLFE (weak): th(1551.1929768229563)=5.306927502155304; dx=-1.2031734296959712E-6 evalInputDelta=0.003395378589630127
New Minimum: 5.306927502155304 > 5.286618024110794
WOLFE (weak): th(10858.350837760694)=5.286618024110794; dx=-1.198979679725835E-6 evalInputDelta=0.023704856634140015
New Minimum: 5.286618024110794 > 5.113806188106537
WOLFE (weak): th(86866.80670208555)=5.113806188106537; dx=-1.1616171517151197E-6 evalInputDelta=0.19651669263839722
New Minimum: 5.113806188106537 > 3.978100672364235
END: th(781801.26031877)=3.978100672364235; dx=-6.555424801323928E-7 evalInputDelta=1.3322222083806992
Fitness changed from 5.310322880744934 to 3.978100672364235
Iteration 1 complete. Error: 3.978100672364235 Total: 217.4520; Orientation: 0.0523; Line Search: 167.0661
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/cbb46c3b-4ea7-471e-972c-a984558c4d17.jpg)
Adding me
...skipping 5903 bytes...
ntation magnitude: 3.838e+03, gradient 2.316e-04, dot -0.358; [8293e8fd-36db-4bfb-8193-beb6d2f78533 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.682261735200882, 2.531089335680008, 3.978100672364235, 5.310322880744934
LBFGS Accumulation History: 3 points
Removed measurement 21c64c91 to history. Total: 3
th(0)=-4.682261735200882;dx=-5.305740045003386E-8
Armijo: th(1.5120000000000002E7)=-4.513905391097069; dx=2.9052810170410907E-8 evalInputDelta=-0.16835634410381317
New Minimum: -4.682261735200882 > -4.911400772631168
WOLF (strong): th(7560000.000000001)=-4.911400772631168; dx=8.841833209380692E-9 evalInputDelta=0.2291390374302864
END: th(2520000.0000000005)=-4.8748157024383545; dx=-2.7215470234520957E-8 evalInputDelta=0.19255396723747253
Fitness changed from -4.682261735200882 to -4.911400772631168
Iteration 9 complete. Error: -4.911400772631168 Total: 84.1797; Orientation: 0.3900; Line Search: 67.3313
Adding measurement 18b68ef2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.878e+03, gradient 2.431e-04, dot -0.338; [8293e8fd-36db-4bfb-8193-beb6d2f78533 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.911400772631168, 2.531089335680008, 3.978100672364235, 5.310322880744934
LBFGS Accumulation History: 3 points
Removed measurement 18b68ef2 to history. Total: 3
th(0)=-4.911400772631168;dx=-5.867239281742804E-8
New Minimum: -4.911400772631168 > -5.1691442131996155
WOLF (strong): th(5429175.418880348)=-5.1691442131996155; dx=9.29871342735708E-9 evalInputDelta=0.2577434405684471
END: th(2714587.709440174)=-5.146617531776428; dx=-1.979626121133181E-8 evalInputDelta=0.23521675914525986
Fitness changed from -4.911400772631168 to -5.1691442131996155
Iteration 10 complete. Error: -5.1691442131996155 Total: 65.8180; Orientation: 0.3981; Line Search: 48.3831
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/887e6b0e-c6c1-44e9-a347-489caa40ebea.jpg)
Final threshold in iteration 11: -5.1691442131996155 (> -Infinity) after 787.027s (< 1800.000s)
-5.1691442131996155