Code from BasicOptimizer.scala:88 executed in 1952.30 seconds (3.363 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: 15557036640830
Reset training subject: 15609193845871
Adding measurement 332cd108 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=4.2686697691679;dx=-3.6726273287113726E-7
New Minimum: 4.2686697691679 > 4.268668591976166
WOLFE (weak): th(2.154434690031884)=4.268668591976166; dx=-3.79840017605571E-7 evalInputDelta=1.1771917343139648E-6
New Minimum: 4.268668591976166 > 4.268666923046112
WOLFE (weak): th(4.308869380063768)=4.268666923046112; dx=-3.659521611150237E-7 evalInputDelta=2.8461217880249023E-6
New Minimum: 4.268666923046112 > 4.268661767244339
WOLFE (weak): th(12.926608140191302)=4.268661767244339; dx=-3.6587355122184756E-7 evalInputDelta=8.001923561096191E-6
New Minimum: 4.268661767244339 > 4.2686382457613945
WOLFE (weak): th(51.70643256076521)=4.2686382457613945; dx=-3.6335809726011384E-7 evalInputDelta=3.152340650558472E-5
New Minimum: 4.2686382457613945 > 4.268512696027756
WOLFE (weak): th(258.53216280382605)=4.268512696027756; dx=-3.6363856500870075E-7 evalInputDelta=1.5707314014434814E-4
New Minimum: 4.268512696027756 > 4.267728850245476
WOLFE (weak): th(1551.1929768229563)=4.267728850245476; dx=-3.6648199657506647E-7 evalInputDelta=9.409189224243164E-4
New Minimum: 4.267728850245476 > 4.262100920081139
WOLFE (weak): th(10858.350837760694)=4.262100920081139; dx=-3.734647049064905E-7 evalInputDelta=0.006568849086761475
New Minimum: 4.262100920081139 > 4.21697810292244
WOLFE (weak): th(86866.80670208555)=4.21697810292244; dx=-3.54245412468796E-7 evalInputDelta=0.05169166624546051
New Minimum: 4.21697810292244 > 3.8714756816625595
END: th(781801.26031877)=3.8714756816625595; dx=-2.5983690741353295E-7 evalInputDelta=0.3971940875053406
Fitness changed from 4.2686697691679 to 3.8714756816625595
Iteration 1 complete. Error: 3.8714756816625595 Total: 665.4640; Orientation: 0.0485; Line Search: 510.7495
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/54b21ce8-ed78-4ae6-92ac-17e0a9555388.jpg)
Adding measurement
...skipping 3732 bytes...
0428791
Iteration 6 complete. Error: 1.973510630428791 Total: 208.4090; Orientation: 1.2453; Line Search: 153.6089
Adding measurement 70b9d4f6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.008e+03, gradient 3.464e-04, dot -0.270; [4122e9ed-2f57-4c1b-9b83-cc61485bc6f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.973510630428791, 3.386540412902832, 3.8714756816625595, 4.2686697691679
LBFGS Accumulation History: 3 points
Removed measurement 70b9d4f6 to history. Total: 3
th(0)=1.973510630428791;dx=-1.1617937975102014E-7
Armijo: th(1.954503150796925E7)=2.9106380939483643; dx=1.4380185084488864E-8 evalInputDelta=-0.9371274635195732
New Minimum: 1.973510630428791 > 1.7688493132591248
WOLF (strong): th(9772515.753984625)=1.7688493132591248; dx=3.3300440517986317E-9 evalInputDelta=0.2046613171696663
New Minimum: 1.7688493132591248 > 1.5338854789733887
END: th(3257505.251328208)=1.5338854789733887; dx=-4.474755605394715E-8 evalInputDelta=0.4396251514554024
Fitness changed from 1.973510630428791 to 1.5338854789733887
Iteration 7 complete. Error: 1.5338854789733887 Total: 255.6499; Orientation: 1.2775; Line Search: 202.4780
Adding measurement 3d8729d9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.342e+03, gradient 2.877e-04, dot -0.329; [4122e9ed-2f57-4c1b-9b83-cc61485bc6f8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.5338854789733887, 3.386540412902832, 3.8714756816625595, 4.2686697691679
LBFGS Accumulation History: 3 points
Removed measurement 3d8729d9 to history. Total: 3
th(0)=1.5338854789733887;dx=-6.672531885287602E-8
New Minimum: 1.5338854789733887 > 1.2137708514928818
END: th(7018082.316422522)=1.2137708514928818; dx=-1.197123241479706E-8 evalInputDelta=0.3201146274805069
Fitness changed from 1.5338854789733887 to 1.2137708514928818
Iteration 8 complete. Error: 1.2137708514928818 Total: 153.2292; Orientation: 1.2452; Line Search: 101.6285
Final threshold in iteration 8: 1.2137708514928818 (> -Infinity) after 1952.300s (< 1800.000s)
1.2137708514928818