Code from BasicOptimizer.scala:88 executed in 526.04 seconds (8.596 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: 605674499870300
Reset training subject: 605685364437100
Adding measurement 3de429c7 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=13.924712896347046;dx=-1.3343904699949204E-6
New Minimum: 13.924712896347046 > 13.924708850681782
WOLFE (weak): th(2.154434690031884)=13.924708850681782; dx=-1.3322223832669993E-6 evalInputDelta=4.045665264129639E-6
New Minimum: 13.924708850681782 > 13.924704983830452
WOLFE (weak): th(4.308869380063768)=13.924704983830452; dx=-1.3322585644694407E-6 evalInputDelta=7.912516593933105E-6
New Minimum: 13.924704983830452 > 13.924688681960106
WOLFE (weak): th(12.926608140191302)=13.924688681960106; dx=-1.3322277991459881E-6 evalInputDelta=2.421438694000244E-5
New Minimum: 13.924688681960106 > 13.924614869058132
WOLFE (weak): th(51.70643256076521)=13.924614869058132; dx=-1.331967126178708E-6 evalInputDelta=9.80272889137268E-5
New Minimum: 13.924614869058132 > 13.924222961068153
WOLFE (weak): th(258.53216280382605)=13.924222961068153; dx=-1.3322855134374485E-6 evalInputDelta=4.899352788925171E-4
New Minimum: 13.924222961068153 > 13.921772219240665
WOLFE (weak): th(1551.1929768229563)=13.921772219240665; dx=-1.3323707118063105E-6 evalInputDelta=0.0029406771063804626
New Minimum: 13.921772219240665 > 13.904145948588848
WOLFE (weak): th(10858.350837760694)=13.904145948588848; dx=-1.3298789650699704E-6 evalInputDelta=0.020566947758197784
New Minimum: 13.904145948588848 > 13.760799139738083
WOLFE (weak): th(86866.80670208555)=13.760799139738083; dx=-1.318638268434349E-6 evalInputDelta=0.163913756608963
New Minimum: 13.760799139738083 > 12.591437429189682
END: th(781801.26031877)=12.591437429189682; dx=-1.0094852118289196E-6 evalInputDelta=1.333275467157364
Fitness changed from 13.924712896347046 to 12.591437429189682
Iteration 1 complete. Error: 12.591437429189682 Total: 143.2504; Orientation: 0.0289; Line Search: 110.1476
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/57
...skipping 6076 bytes...
on magnitude: 4.396e+03, gradient 3.760e-04, dot -0.393; [6e624d8a-33bc-464a-9dc2-9c2ea60a7448 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.424807086586952, 10.976985290646553, 12.591437429189682, 13.924712896347046
LBFGS Accumulation History: 3 points
Removed measurement 550383c7 to history. Total: 3
th(0)=4.424807086586952;dx=-1.4126985432068693E-7
New Minimum: 4.424807086586952 > 4.13407364487648
WOLF (strong): th(5040000.000000001)=4.13407364487648; dx=3.424536376897989E-8 evalInputDelta=0.2907334417104721
New Minimum: 4.13407364487648 > 4.0738005340099335
END: th(2520000.0000000005)=4.0738005340099335; dx=-4.1609189967098606E-8 evalInputDelta=0.35100655257701874
Fitness changed from 4.424807086586952 to 4.0738005340099335
Iteration 9 complete. Error: 4.0738005340099335 Total: 44.6169; Orientation: 0.4111; Line Search: 33.1407
Adding measurement 75af57ad to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.551e+03, gradient 3.058e-04, dot -0.455; [6e624d8a-33bc-464a-9dc2-9c2ea60a7448 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 4.0738005340099335, 10.976985290646553, 12.591437429189682, 13.924712896347046
LBFGS Accumulation History: 3 points
Removed measurement 75af57ad to history. Total: 3
th(0)=4.0738005340099335;dx=-9.342622625560376E-8
New Minimum: 4.0738005340099335 > 3.9042739421129227
WOLF (strong): th(5429175.418880348)=3.9042739421129227; dx=4.68851545465521E-10 evalInputDelta=0.1695265918970108
New Minimum: 3.9042739421129227 > 3.890513092279434
END: th(2714587.709440174)=3.890513092279434; dx=-1.7146680840083093E-8 evalInputDelta=0.18328744173049927
Fitness changed from 4.0738005340099335 to 3.890513092279434
Iteration 10 complete. Error: 3.890513092279434 Total: 44.6556; Orientation: 0.4028; Line Search: 33.5670
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/439026ec-8ded-4d8a-b5c8-d827831c9a9c.jpg)
Final threshold in iteration 11: 3.890513092279434 (> -Infinity) after 526.035s (< 3600.000s)
3.890513092279434