Code from BasicOptimizer.scala:88 executed in 65.53 seconds (2.837 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: 1345844992780
Reset training subject: 1347387531863
Adding measurement 6f425257 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=26.873591309413314;dx=-1.0023720418223851E-5
New Minimum: 26.873591309413314 > 26.8735662214458
WOLFE (weak): th(2.154434690031884)=26.8735662214458; dx=-1.0010978661412808E-5 evalInputDelta=2.508796751499176E-5
New Minimum: 26.8735662214458 > 26.873542096465826
WOLFE (weak): th(4.308869380063768)=26.873542096465826; dx=-1.0018794219186124E-5 evalInputDelta=4.9212947487831116E-5
New Minimum: 26.873542096465826 > 26.87344440538436
WOLFE (weak): th(12.926608140191302)=26.87344440538436; dx=-9.993163138873884E-6 evalInputDelta=1.4690402895212173E-4
New Minimum: 26.87344440538436 > 26.873005410656333
WOLFE (weak): th(51.70643256076521)=26.873005410656333; dx=-1.0010238763858976E-5 evalInputDelta=5.85898756980896E-4
New Minimum: 26.873005410656333 > 26.870663756504655
WOLFE (weak): th(258.53216280382605)=26.870663756504655; dx=-1.000585491343974E-5 evalInputDelta=0.0029275529086589813
New Minimum: 26.870663756504655 > 26.855952044017613
WOLFE (weak): th(1551.1929768229563)=26.855952044017613; dx=-1.0092918253741857E-5 evalInputDelta=0.01763926539570093
New Minimum: 26.855952044017613 > 26.746720174327493
WOLFE (weak): th(10858.350837760694)=26.746720174327493; dx=-1.041588829521963E-5 evalInputDelta=0.12687113508582115
New Minimum: 26.746720174327493 > 25.84008887782693
WOLFE (weak): th(86866.80670208555)=25.84008887782693; dx=-9.207666584890748E-6 evalInputDelta=1.0335024315863848
New Minimum: 25.84008887782693 > 21.120122410357
END: th(781801.26031877)=21.120122410357; dx=-4.3312489630841264E-6 evalInputDelta=5.753468899056315
Fitness changed from 26.873591309413314 to 21.120122410357
Iteration 1 complete. Error: 21.120122410357 Total: 18.9520; Orientation: 0.0465; Line Search: 14.6440
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/9a4fb37a-ee09-46d8-b70b-61ccdb1cb417.jpg)
Adding measureme
...skipping 5567 bytes...
5 > 1.4558675736188889
END: th(2339360.772140841)=1.4558675736188889; dx=-8.572516981239413E-8 evalInputDelta=0.31528258323669434
Fitness changed from 1.7711501568555832 to 1.4558675736188889
Iteration 8 complete. Error: 1.4558675736188889 Total: 7.8508; Orientation: 0.9843; Line Search: 5.3359
Adding measurement 585af864 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.475e+03, gradient 3.263e-04, dot -0.323; [9883172d-83cd-4f82-a4a2-857173012420 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.4558675736188889, 13.07340683043003, 21.120122410357, 26.873591309413314
LBFGS Accumulation History: 3 points
Removed measurement 585af864 to history. Total: 3
th(0)=1.4558675736188889;dx=-1.0583747788266089E-7
New Minimum: 1.4558675736188889 > 1.073365867137909
END: th(5040000.000000001)=1.073365867137909; dx=-6.353394644576027E-8 evalInputDelta=0.3825017064809799
Fitness changed from 1.4558675736188889 to 1.073365867137909
Iteration 9 complete. Error: 1.073365867137909 Total: 4.2220; Orientation: 0.0787; Line Search: 2.8310
Adding measurement 4452cc2d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.692e+03, gradient 3.023e-04, dot -0.341; [9883172d-83cd-4f82-a4a2-857173012420 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.073365867137909, 13.07340683043003, 21.120122410357, 26.873591309413314
LBFGS Accumulation History: 3 points
Removed measurement 4452cc2d to history. Total: 3
th(0)=1.073365867137909;dx=-9.05251586383971E-8
New Minimum: 1.073365867137909 > 0.7699247002601624
END: th(1.0858350837760696E7)=0.7699247002601624; dx=-7.172009213935814E-9 evalInputDelta=0.3034411668777466
Fitness changed from 1.073365867137909 to 0.7699247002601624
Iteration 10 complete. Error: 0.7699247002601624 Total: 4.0474; Orientation: 0.0699; Line Search: 2.6620
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e50008f0-99da-45d1-b4d1-5fb0dbac9bdb.jpg)
Final threshold in iteration 11: 0.7699247002601624 (> -Infinity) after 65.511s (< 3600.000s)
0.7699247002601624