Code from BasicOptimizer.scala:88 executed in 249.89 seconds (8.024 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: 602095799990000
Reset training subject: 602102528841200
Adding measurement 37ad86cb to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=26.363047384656966;dx=-1.0833517718618602E-5
New Minimum: 26.363047384656966 > 26.363010505214334
WOLFE (weak): th(2.154434690031884)=26.363010505214334; dx=-1.0831230082970158E-5 evalInputDelta=3.6879442632198334E-5
New Minimum: 26.363010505214334 > 26.362973637878895
WOLFE (weak): th(4.308869380063768)=26.362973637878895; dx=-1.0825747019096543E-5 evalInputDelta=7.374677807092667E-5
New Minimum: 26.362973637878895 > 26.362825197167695
WOLFE (weak): th(12.926608140191302)=26.362825197167695; dx=-1.0817898542166031E-5 evalInputDelta=2.2218748927116394E-4
New Minimum: 26.362825197167695 > 26.362158657051623
WOLFE (weak): th(51.70643256076521)=26.362158657051623; dx=-1.0827521140043073E-5 evalInputDelta=8.88727605342865E-4
New Minimum: 26.362158657051623 > 26.358592635951936
WOLFE (weak): th(258.53216280382605)=26.358592635951936; dx=-1.0879389479455356E-5 evalInputDelta=0.004454748705029488
New Minimum: 26.358592635951936 > 26.336077235639095
WOLFE (weak): th(1551.1929768229563)=26.336077235639095; dx=-1.104579719840232E-5 evalInputDelta=0.026970149017870426
New Minimum: 26.336077235639095 > 26.162333049811423
WOLFE (weak): th(10858.350837760694)=26.162333049811423; dx=-1.213895456596462E-5 evalInputDelta=0.2007143348455429
New Minimum: 26.162333049811423 > 24.72452052682638
END: th(86866.80670208555)=24.72452052682638; dx=-9.700133958769928E-6 evalInputDelta=1.638526857830584
Fitness changed from 26.363047384656966 to 24.72452052682638
Iteration 1 complete. Error: 24.72452052682638 Total: 70.3235; Orientation: 0.0404; Line Search: 52.7382
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/23268d83-07e8-49e1-b76b-5227dfa29f93.jpg)
Adding measurement 4fb63dde to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=24.72452052682638;dx=-1.6560536951555394
...skipping 5511 bytes...
END: th(779786.9240469472)=5.182915076613426; dx=-3.965252040729676E-7 evalInputDelta=0.7302258610725403
Fitness changed from 5.9131409376859665 to 5.182915076613426
Iteration 8 complete. Error: 5.182915076613426 Total: 27.9956; Orientation: 0.1860; Line Search: 22.2632
Adding measurement 73368bb6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.435e+03, gradient 6.524e-04, dot -0.213; [7e38125c-ce12-4e1d-bab6-773f2f90d5df = 1.000/1.000e+00]
Orientation rejected. Popping history element from 5.182915076613426, 21.352281972765923, 24.72452052682638, 26.363047384656966
LBFGS Accumulation History: 3 points
Removed measurement 73368bb6 to history. Total: 3
th(0)=5.182915076613426;dx=-4.2411484244377215E-7
New Minimum: 5.182915076613426 > 4.57533797621727
END: th(1680000.0000000007)=4.57533797621727; dx=-1.7450124497987804E-7 evalInputDelta=0.6075771003961563
Fitness changed from 5.182915076613426 to 4.57533797621727
Iteration 9 complete. Error: 4.57533797621727 Total: 18.0009; Orientation: 0.1885; Line Search: 10.9472
Adding measurement 1e8dca26 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.116e+03, gradient 6.082e-04, dot -0.213; [7e38125c-ce12-4e1d-bab6-773f2f90d5df = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.57533797621727, 21.352281972765923, 24.72452052682638, 26.363047384656966
LBFGS Accumulation History: 3 points
Removed measurement 1e8dca26 to history. Total: 3
th(0)=4.57533797621727;dx=-3.6771394367209196E-7
New Minimum: 4.57533797621727 > 3.9633306860923767
END: th(3619450.279253566)=3.9633306860923767; dx=-5.728654925742894E-8 evalInputDelta=0.6120072901248932
Fitness changed from 4.57533797621727 to 3.9633306860923767
Iteration 10 complete. Error: 3.9633306860923767 Total: 16.7942; Orientation: 0.1848; Line Search: 11.0536
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1482a851-ba6a-4bc2-8c2c-3ad5f6c6946c.jpg)
Final threshold in iteration 11: 3.9633306860923767 (> -Infinity) after 249.868s (< 3600.000s)
3.9633306860923767