Code from BasicOptimizer.scala:88 executed in 536.09 seconds (2.968 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: 21296251821626
Reset training subject: 21309475599999
Adding measurement 5f3b0aba to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=19.853689030744135;dx=-7.39507016940531E-6
New Minimum: 19.853689030744135 > 19.853638399392366
WOLFE (weak): th(2.154434690031884)=19.853638399392366; dx=-7.37186570359429E-6 evalInputDelta=5.063135176897049E-5
New Minimum: 19.853638399392366 > 19.853588309139013
WOLFE (weak): th(4.308869380063768)=19.853588309139013; dx=-7.2036814355091674E-6 evalInputDelta=1.0072160512208939E-4
New Minimum: 19.853588309139013 > 19.85338907223195
WOLFE (weak): th(12.926608140191302)=19.85338907223195; dx=-7.175937258506237E-6 evalInputDelta=2.999585121870041E-4
New Minimum: 19.85338907223195 > 19.85249105747789
WOLFE (weak): th(51.70643256076521)=19.85249105747789; dx=-7.331059224891325E-6 evalInputDelta=0.0011979732662439346
New Minimum: 19.85249105747789 > 19.8476977115497
WOLFE (weak): th(258.53216280382605)=19.8476977115497; dx=-7.333689855563255E-6 evalInputDelta=0.005991319194436073
New Minimum: 19.8476977115497 > 19.815735556185246
WOLFE (weak): th(1551.1929768229563)=19.815735556185246; dx=-7.404072088914567E-6 evalInputDelta=0.037953474558889866
New Minimum: 19.815735556185246 > 19.602108335122466
WOLFE (weak): th(10858.350837760694)=19.602108335122466; dx=-7.607925601087367E-6 evalInputDelta=0.2515806956216693
New Minimum: 19.602108335122466 > 18.453186713159084
END: th(86866.80670208555)=18.453186713159084; dx=-2.252061283938479E-6 evalInputDelta=1.400502317585051
Fitness changed from 19.853689030744135 to 18.453186713159084
Iteration 1 complete. Error: 18.453186713159084 Total: 144.2892; Orientation: 0.0089; Line Search: 107.3653
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6705ad01-337f-47fc-b360-7f11fd1ddd89.jpg)
Adding measurement 3a2298da to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=18.453186713159084;dx=-8.942243177936941E-6
New Minimum: 18.453186713159084 > 16.
...skipping 5554 bytes...
Total: 3
Rejected: LBFGS Orientation magnitude: 1.717e+03, gradient 5.847e-04, dot -0.368; [0dac9c55-e88c-4116-a625-3a099d27b8af = 1.000/1.000e+00]
Orientation rejected. Popping history element from 8.022082589566708, 16.825614921748638, 18.453186713159084, 19.853689030744135
LBFGS Accumulation History: 3 points
Removed measurement 4c9e358f to history. Total: 3
th(0)=8.022082589566708;dx=-3.1438233447541353E-7
New Minimum: 8.022082589566708 > 7.825809508562088
WOLF (strong): th(3360000.0000000014)=7.825809508562088; dx=3.935136572551833E-8 evalInputDelta=0.1962730810046196
New Minimum: 7.825809508562088 > 7.421288460493088
END: th(1680000.0000000007)=7.421288460493088; dx=-2.3553124515439526E-8 evalInputDelta=0.6007941290736198
Fitness changed from 8.022082589566708 to 7.421288460493088
Iteration 9 complete. Error: 7.421288460493088 Total: 48.3563; Orientation: 0.2489; Line Search: 35.8865
Adding measurement 4122ef77 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.471e+03, gradient 5.912e-04, dot -0.304; [0dac9c55-e88c-4116-a625-3a099d27b8af = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7.421288460493088, 16.825614921748638, 18.453186713159084, 19.853689030744135
LBFGS Accumulation History: 3 points
Removed measurement 4122ef77 to history. Total: 3
th(0)=7.421288460493088;dx=-3.369847949189892E-7
New Minimum: 7.421288460493088 > 7.346122309565544
WOLF (strong): th(3619450.279253566)=7.346122309565544; dx=5.405276776054283E-8 evalInputDelta=0.07516615092754364
New Minimum: 7.346122309565544 > 6.930884286761284
END: th(1809725.139626783)=6.930884286761284; dx=-1.935169994229219E-9 evalInputDelta=0.4904041737318039
Fitness changed from 7.421288460493088 to 6.930884286761284
Iteration 10 complete. Error: 6.930884286761284 Total: 48.2497; Orientation: 0.2287; Line Search: 35.7520
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/064e1f66-a48c-4e8e-b9e3-2f3b8d0d5a78.jpg)
Final threshold in iteration 11: 6.930884286761284 (> -Infinity) after 536.085s (< 1800.000s)
6.930884286761284