Code from BasicOptimizer.scala:88 executed in 68.32 seconds (2.016 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: 669473488303
Reset training subject: 670749122196
Adding measurement 1bb77d6f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=26.919752076268196;dx=-8.492539096893409E-6
New Minimum: 26.919752076268196 > 26.919721310958266
WOLFE (weak): th(2.154434690031884)=26.919721310958266; dx=-8.483313207054191E-6 evalInputDelta=3.076530992984772E-5
New Minimum: 26.919721310958266 > 26.91969053912908
WOLFE (weak): th(4.308869380063768)=26.91969053912908; dx=-8.494931171288175E-6 evalInputDelta=6.153713911771774E-5
New Minimum: 26.91969053912908 > 26.919568618759513
WOLFE (weak): th(12.926608140191302)=26.919568618759513; dx=-8.494298197255155E-6 evalInputDelta=1.8345750868320465E-4
New Minimum: 26.919568618759513 > 26.919018018990755
WOLFE (weak): th(51.70643256076521)=26.919018018990755; dx=-8.480958831232546E-6 evalInputDelta=7.340572774410248E-4
New Minimum: 26.919018018990755 > 26.91607483290136
WOLFE (weak): th(258.53216280382605)=26.91607483290136; dx=-8.508872695173522E-6 evalInputDelta=0.0036772433668375015
New Minimum: 26.91607483290136 > 26.897519142366946
WOLFE (weak): th(1551.1929768229563)=26.897519142366946; dx=-8.64240686583752E-6 evalInputDelta=0.022232933901250362
New Minimum: 26.897519142366946 > 26.75528455991298
WOLFE (weak): th(10858.350837760694)=26.75528455991298; dx=-9.356163824263593E-6 evalInputDelta=0.1644675163552165
New Minimum: 26.75528455991298 > 25.46928926743567
WOLFE (weak): th(86866.80670208555)=25.46928926743567; dx=-8.935194709670728E-6 evalInputDelta=1.4504628088325262
New Minimum: 25.46928926743567 > 20.2745823264122
END: th(781801.26031877)=20.2745823264122; dx=-3.5019405751963496E-6 evalInputDelta=6.645169749855995
Fitness changed from 26.919752076268196 to 20.2745823264122
Iteration 1 complete. Error: 20.2745823264122 Total: 17.3317; Orientation: 0.0051; Line Search: 13.2367
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/67fdc9bb-803c-46d0-8ed5-14436bacecc3.jpg)
Adding measurement 3
...skipping 5916 bytes...
rch: 5.6006
Adding measurement 6a188f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.579e+03, gradient 3.830e-04, dot -0.401; [d2177e82-fc51-4096-b2f7-0330a7dfb524 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.9289803355932236, 13.279334053397179, 20.2745823264122, 26.919752076268196
LBFGS Accumulation History: 3 points
Removed measurement 6a188f to history. Total: 3
th(0)=2.9289803355932236;dx=-1.4569787519439203E-7
New Minimum: 2.9289803355932236 > 2.5151211321353912
END: th(3780000.0000000005)=2.5151211321353912; dx=-5.413911626759244E-8 evalInputDelta=0.41385920345783234
Fitness changed from 2.9289803355932236 to 2.5151211321353912
Iteration 9 complete. Error: 2.5151211321353912 Total: 4.1287; Orientation: 0.1527; Line Search: 2.5629
Adding measurement 3bb6ea1c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.758e+03, gradient 3.893e-04, dot -0.387; [d2177e82-fc51-4096-b2f7-0330a7dfb524 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.5151211321353912, 13.279334053397179, 20.2745823264122, 26.919752076268196
LBFGS Accumulation History: 3 points
Removed measurement 3bb6ea1c to history. Total: 3
th(0)=2.5151211321353912;dx=-1.5047822110490181E-7
Armijo: th(8143763.128320522)=2.8285314440727234; dx=6.02372457888452E-8 evalInputDelta=-0.31341031193733215
New Minimum: 2.5151211321353912 > 2.3316401839256287
WOLF (strong): th(4071881.564160261)=2.3316401839256287; dx=1.3731202112419034E-8 evalInputDelta=0.18348094820976257
New Minimum: 2.3316401839256287 > 2.313649982213974
END: th(1357293.854720087)=2.313649982213974; dx=-8.410082559620798E-8 evalInputDelta=0.20147114992141724
Fitness changed from 2.5151211321353912 to 2.313649982213974
Iteration 10 complete. Error: 2.313649982213974 Total: 6.8795; Orientation: 0.2235; Line Search: 5.3630
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9b1339ee-23dc-468f-b8e5-1776ea9475e7.jpg)
Final threshold in iteration 11: 2.313649982213974 (> -Infinity) after 68.317s (< 3600.000s)
2.313649982213974