Code from BasicOptimizer.scala:88 executed in 343.46 seconds (5.911 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: 2331960720214
Reset training subject: 2340301349494
Adding measurement 4a671cc1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=12.845192298293114;dx=-4.43086767092264E-7
New Minimum: 12.845192298293114 > 12.845191113650799
WOLFE (weak): th(2.154434690031884)=12.845191113650799; dx=-4.4183102480168745E-7 evalInputDelta=1.1846423149108887E-6
New Minimum: 12.845191113650799 > 12.845189839601517
WOLFE (weak): th(4.308869380063768)=12.845189839601517; dx=-4.3426159284843736E-7 evalInputDelta=2.4586915969848633E-6
New Minimum: 12.845189839601517 > 12.845184721052647
WOLFE (weak): th(12.926608140191302)=12.845184721052647; dx=-4.406445076485779E-7 evalInputDelta=7.577240467071533E-6
New Minimum: 12.845184721052647 > 12.845161698758602
WOLFE (weak): th(51.70643256076521)=12.845161698758602; dx=-4.389433094052857E-7 evalInputDelta=3.059953451156616E-5
New Minimum: 12.845161698758602 > 12.845039747655392
WOLFE (weak): th(258.53216280382605)=12.845039747655392; dx=-4.415660324739115E-7 evalInputDelta=1.5255063772201538E-4
New Minimum: 12.845039747655392 > 12.844277612864971
WOLFE (weak): th(1551.1929768229563)=12.844277612864971; dx=-4.390238373189055E-7 evalInputDelta=9.146854281425476E-4
New Minimum: 12.844277612864971 > 12.838793851435184
WOLFE (weak): th(10858.350837760694)=12.838793851435184; dx=-4.3933053109091234E-7 evalInputDelta=0.00639844685792923
New Minimum: 12.838793851435184 > 12.794862575829029
WOLFE (weak): th(86866.80670208555)=12.794862575829029; dx=-4.1829563485710726E-7 evalInputDelta=0.050329722464084625
New Minimum: 12.794862575829029 > 12.442799597978592
END: th(781801.26031877)=12.442799597978592; dx=-2.930175205435378E-7 evalInputDelta=0.4023927003145218
Fitness changed from 12.845192298293114 to 12.442799597978592
Iteration 1 complete. Error: 12.442799597978592 Total: 99.7454; Orientation: 0.0297; Line Search: 76.7288
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/d85403c3-3c63-4609-9924-2d9af373d
...skipping 5363 bytes...
0422404408455 Total: 31.6747; Orientation: 0.3953; Line Search: 23.3053
Adding measurement 76614765 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.244e+03, gradient 1.885e-04, dot -0.185; [d178371a-9501-4e3c-8125-07a0786e2837 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 6.530422404408455, 11.84547995775938, 12.442799597978592, 12.845192298293114
LBFGS Accumulation History: 3 points
Removed measurement 76614765 to history. Total: 3
th(0)=6.530422404408455;dx=-3.50819640156382E-8
Armijo: th(9.072000000000001E7)=7.456364691257477; dx=2.6985907633887497E-9 evalInputDelta=-0.9259422868490219
New Minimum: 6.530422404408455 > 5.936449706554413
END: th(4.536000000000001E7)=5.936449706554413; dx=-5.447687741806557E-9 evalInputDelta=0.593972697854042
Fitness changed from 6.530422404408455 to 5.936449706554413
Iteration 9 complete. Error: 5.936449706554413 Total: 31.9241; Orientation: 0.3935; Line Search: 24.5598
Adding measurement dfe93db to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.356e+03, gradient 1.547e-04, dot -0.186; [d178371a-9501-4e3c-8125-07a0786e2837 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 5.936449706554413, 11.84547995775938, 12.442799597978592, 12.845192298293114
LBFGS Accumulation History: 3 points
Removed measurement dfe93db to history. Total: 3
th(0)=5.936449706554413;dx=-2.3575054334187302E-8
Armijo: th(9.772515753984627E7)=7.108692407608032; dx=1.6948964208387394E-9 evalInputDelta=-1.1722427010536194
New Minimum: 5.936449706554413 > 5.620206966996193
END: th(4.8862578769923136E7)=5.620206966996193; dx=-2.6213489889433666E-9 evalInputDelta=0.3162427395582199
Fitness changed from 5.936449706554413 to 5.620206966996193
Iteration 10 complete. Error: 5.620206966996193 Total: 30.9503; Orientation: 0.5154; Line Search: 22.9438
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/04f4360e-21d4-44fb-99b4-7d8200985a96.jpg)
Final threshold in iteration 11: 5.620206966996193 (> -Infinity) after 343.450s (< 1800.000s)
5.620206966996193