Code from BasicOptimizer.scala:88 executed in 248.67 seconds (7.517 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: 602697031930900
Reset training subject: 602703381255200
Adding measurement 36b0670 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=26.276818958111107;dx=-1.1484527217295639E-5
New Minimum: 26.276818958111107 > 26.276780837215483
WOLFE (weak): th(2.154434690031884)=26.276780837215483; dx=-1.1479734500780953E-5 evalInputDelta=3.8120895624160767E-5
New Minimum: 26.276780837215483 > 26.27674272377044
WOLFE (weak): th(4.308869380063768)=26.27674272377044; dx=-1.1482814980506884E-5 evalInputDelta=7.623434066772461E-5
New Minimum: 26.27674272377044 > 26.27659071981907
WOLFE (weak): th(12.926608140191302)=26.27659071981907; dx=-1.1475184422246432E-5 evalInputDelta=2.282382920384407E-4
New Minimum: 26.27659071981907 > 26.27590819541365
WOLFE (weak): th(51.70643256076521)=26.27590819541365; dx=-1.1485926686791182E-5 evalInputDelta=9.107626974582672E-4
New Minimum: 26.27590819541365 > 26.272253633476794
WOLFE (weak): th(258.53216280382605)=26.272253633476794; dx=-1.1533598071041043E-5 evalInputDelta=0.004565324634313583
New Minimum: 26.272253633476794 > 26.24921641871333
WOLFE (weak): th(1551.1929768229563)=26.24921641871333; dx=-1.1681277114069083E-5 evalInputDelta=0.027602539397776127
New Minimum: 26.24921641871333 > 26.07369891181588
WOLFE (weak): th(10858.350837760694)=26.07369891181588; dx=-1.2614576517135333E-5 evalInputDelta=0.20312004629522562
New Minimum: 26.07369891181588 > 24.668417455628514
END: th(86866.80670208555)=24.668417455628514; dx=-1.0074729760650638E-5 evalInputDelta=1.608401502482593
Fitness changed from 26.276818958111107 to 24.668417455628514
Iteration 1 complete. Error: 24.668417455628514 Total: 67.1892; Orientation: 0.0173; Line Search: 50.0164
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b24e415c-24a2-4e25-bbae-497c4d90f27a.jpg)
Adding measurement 4350595c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=24.668417455628514;dx=-1.5438913710122836E-5
Ne
...skipping 5662 bytes...
complete. Error: 4.892654791474342 Total: 27.2074; Orientation: 0.1747; Line Search: 21.6834
Adding measurement 6c1ca986 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.018e+03, gradient 7.919e-04, dot -0.106; [2f145e18-4774-4bba-bbbd-3ddddb12a8a3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.892654791474342, 21.674996733665466, 24.668417455628514, 26.276818958111107
LBFGS Accumulation History: 3 points
Removed measurement 6c1ca986 to history. Total: 3
th(0)=4.892654791474342;dx=-6.241525372327748E-7
New Minimum: 4.892654791474342 > 4.093636706471443
END: th(1680000.0000000007)=4.093636706471443; dx=-3.868877583458728E-8 evalInputDelta=0.7990180850028992
Fitness changed from 4.892654791474342 to 4.093636706471443
Iteration 9 complete. Error: 4.093636706471443 Total: 17.8336; Orientation: 0.2246; Line Search: 12.1234
Adding measurement 1cf94698 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.403e+03, gradient 6.192e-04, dot -0.195; [2f145e18-4774-4bba-bbbd-3ddddb12a8a3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.093636706471443, 21.674996733665466, 24.668417455628514, 26.276818958111107
LBFGS Accumulation History: 3 points
Removed measurement 1cf94698 to history. Total: 3
th(0)=4.093636706471443;dx=-3.8147146987064433E-7
New Minimum: 4.093636706471443 > 4.061174005270004
WOLF (strong): th(3619450.279253566)=4.061174005270004; dx=1.1732608278489184E-7 evalInputDelta=0.032462701201438904
New Minimum: 4.061174005270004 > 3.7119838297367096
END: th(1809725.139626783)=3.7119838297367096; dx=-1.6293082244105537E-8 evalInputDelta=0.3816528767347336
Fitness changed from 4.093636706471443 to 3.7119838297367096
Iteration 10 complete. Error: 3.7119838297367096 Total: 21.7807; Orientation: 0.1768; Line Search: 16.2427
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/2494e0c7-fcb2-41ef-bdfc-98383da9eeba.jpg)
Final threshold in iteration 11: 3.7119838297367096 (> -Infinity) after 248.670s (< 3600.000s)
3.7119838297367096