Code from BasicOptimizer.scala:88 executed in 1664.72 seconds (6.804 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: 3919500661927
Reset training subject: 3955409040051
Adding measurement bfcee69 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=7.904974292963743;dx=-6.377661571849126E-8
New Minimum: 7.904974292963743 > 7.904974225908518
WOLFE (weak): th(2.154434690031884)=7.904974225908518; dx=-6.492941118061037E-8 evalInputDelta=6.705522537231445E-8
New Minimum: 7.904974225908518 > 7.904973912984133
WOLFE (weak): th(4.308869380063768)=7.904973912984133; dx=-6.353656865499589E-8 evalInputDelta=3.7997961044311523E-7
New Minimum: 7.904973912984133 > 7.904972709715366
WOLFE (weak): th(12.926608140191302)=7.904972709715366; dx=-6.43996673676735E-8 evalInputDelta=1.5832483768463135E-6
New Minimum: 7.904972709715366 > 7.904966808855534
WOLFE (weak): th(51.70643256076521)=7.904966808855534; dx=-6.351807869561587E-8 evalInputDelta=7.484108209609985E-6
New Minimum: 7.904966808855534 > 7.904936980456114
WOLFE (weak): th(258.53216280382605)=7.904936980456114; dx=-6.432017310032465E-8 evalInputDelta=3.731250762939453E-5
New Minimum: 7.904936980456114 > 7.90475195273757
WOLFE (weak): th(1551.1929768229563)=7.90475195273757; dx=-6.319794352274039E-8 evalInputDelta=2.2234022617340088E-4
New Minimum: 7.90475195273757 > 7.903416112065315
WOLFE (weak): th(10858.350837760694)=7.903416112065315; dx=-6.420857992511731E-8 evalInputDelta=0.0015581808984279633
New Minimum: 7.903416112065315 > 7.892524268478155
WOLFE (weak): th(86866.80670208555)=7.892524268478155; dx=-6.449022789808921E-8 evalInputDelta=0.012450024485588074
New Minimum: 7.892524268478155 > 7.793638411909342
WOLFE (weak): th(781801.26031877)=7.793638411909342; dx=-6.168680800313339E-8 evalInputDelta=0.1113358810544014
New Minimum: 7.793638411909342 > 6.8746689930558205
END: th(7818012.6031877)=6.8746689930558205; dx=-3.7383661743732455E-8 evalInputDelta=1.0303052999079227
Fitness changed from 7.904974292963743 to 6.8746689930558205
Iteration 1 complete. Error: 6.8746689930558205 Total: 498.4480; Orient
...skipping 5911 bytes...
a08-4dfeba58cfae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8931373804807663, 5.315513156354427, 6.8746689930558205, 7.904974292963743
LBFGS Accumulation History: 3 points
Removed measurement 5c5c208c to history. Total: 3
th(0)=-1.8931373804807663;dx=-3.0124720504597613E-9
Armijo: th(4.536000000000002E8)=-0.8873300701379776; dx=1.0034757703162004E-9 evalInputDelta=-1.0058073103427887
New Minimum: -1.8931373804807663 > -2.1024896055459976
END: th(2.268000000000001E8)=-2.1024896055459976; dx=-5.385312617048484E-11 evalInputDelta=0.20935222506523132
Fitness changed from -1.8931373804807663 to -2.1024896055459976
Iteration 9 complete. Error: -2.1024896055459976 Total: 141.1245; Orientation: 0.6333; Line Search: 106.1472
Adding measurement 4adf55f2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.900e+03, gradient 5.820e-05, dot -0.197; [1332a3f9-693d-4a9d-8a08-4dfeba58cfae = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.1024896055459976, 5.315513156354427, 6.8746689930558205, 7.904974292963743
LBFGS Accumulation History: 3 points
Removed measurement 4adf55f2 to history. Total: 3
th(0)=-2.1024896055459976;dx=-3.377063319345046E-9
Armijo: th(4.8862578769923145E8)=-0.535228006541729; dx=1.2785889668812793E-9 evalInputDelta=-1.5672615990042686
New Minimum: -2.1024896055459976 > -2.1582388132810593
WOLF (strong): th(2.4431289384961572E8)=-2.1582388132810593; dx=2.2459029422239081E-10 evalInputDelta=0.055749207735061646
New Minimum: -2.1582388132810593 > -2.3867678493261337
END: th(8.143763128320524E7)=-2.3867678493261337; dx=-1.0702721821891497E-9 evalInputDelta=0.2842782437801361
Fitness changed from -2.1024896055459976 to -2.3867678493261337
Iteration 10 complete. Error: -2.3867678493261337 Total: 175.3189; Orientation: 0.6360; Line Search: 139.0086
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/066e1721-3114-497a-868d-7fb661c64a1b.jpg)
Final threshold in iteration 11: -2.3867678493261337 (> -Infinity) after 1664.721s (< 1800.000s)
-2.3867678493261337