Code from BasicOptimizer.scala:75 executed in 970.68 seconds (11.660 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
IterativeTrainer.wrap(trainable)
.setOrientation(orientation())
.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = trainingMonitor.log(msg)
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(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, currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
.setTimeout(trainingMinutes, TimeUnit.MINUTES)
.setMaxIterations(trainingIterations)
.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
.runAndFree
.asInstanceOf[lang.Double]
Reset training subject: 1235198943746600
Reset training subject: 1235207503605600
Adding measurement 74fb5b59 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=5.208453756592769;dx=-2.6643074749787806E-5
New Minimum: 5.208453756592769 > 5.208428767239868
WOLFE (weak): th(2.154434690031884)=5.208428767239868; dx=-2.6642823394612492E-5 evalInputDelta=2.4989352901627626E-5
New Minimum: 5.208428767239868 > 5.208403967691168
WOLFE (weak): th(4.308869380063768)=5.208403967691168; dx=-2.6642560842245465E-5 evalInputDelta=4.978890160156624E-5
New Minimum: 5.208403967691168 > 5.208304106178593
WOLFE (weak): th(12.926608140191302)=5.208304106178593; dx=-2.664060961289464E-5 evalInputDelta=1.4965041417625002E-4
New Minimum: 5.208304106178593 > 5.2078550735919
WOLFE (weak): th(51.70643256076521)=5.2078550735919; dx=-2.6631803797874976E-5 evalInputDelta=5.986830008692934E-4
New Minimum: 5.2078550735919 > 5.205461296403608
WOLFE (weak): th(258.53216280382605)=5.205461296403608; dx=-2.6597624235889863E-5 evalInputDelta=0.002992460189161328
New Minimum: 5.205461296403608 > 5.190562326108194
WOLFE (weak): th(1551.1929768229563)=5.190562326108194; dx=-2.6407092815219953E-5 evalInputDelta=0.017891430484575643
New Minimum: 5.190562326108194 > 5.086425767148807
WOLFE (weak): th(10858.350837760694)=5.086425767148807; dx=-2.4991747909913155E-5 evalInputDelta=0.12202798944396243
New Minimum: 5.086425767148807 > 4.438882994716062
END: th(86866.80670208555)=4.438882994716062; dx=-1.521726809403557E-5 evalInputDelta=0.7695707618767074
Fitness changed from 5.208453756592769 to 4.438882994716062
Iteration 1 complete. Error: 4.438882994716062 Total: 96.2194; Orientation: 0.0070; Line Search: 71.7174
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/984a08aa-1dd7-400e-8580-127f4b517ac1.jpg)
Adding measurement 3b170235 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=4.438882994716062;dx=-0.005555612260900155
New Minimum: 4.43888
...skipping 23874 bytes...
g measurement 7d088813 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.413e+03, gradient 1.943e-04, dot -0.820; [f054d2ca-7cb9-40d2-9963-bcf5ff54c8fb = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.19540959697341684, 0.18023824878909178, 0.16333927691167438, 0.14768433103082743
LBFGS Accumulation History: 3 points
Removed measurement 52cb52bd to history. Total: 4
th(0)=0.14768433103082743;dx=-3.7768111510101005E-8
Armijo: th(6963975.016137152)=0.14888215929909682; dx=-1.2917703092893122E-8 evalInputDelta=-0.0011978282682693908
New Minimum: 0.14768433103082743 > 0.13320183251894238
END: th(3481987.508068576)=0.13320183251894238; dx=-2.1626012949095658E-8 evalInputDelta=0.014482498511885045
Fitness changed from 0.14768433103082743 to 0.13320183251894238
Iteration 29 complete. Error: 0.13320183251894238 Total: 31.9813; Orientation: 0.2000; Line Search: 23.7224
Adding measurement 2a4e939a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.773e+03, gradient 2.037e-04, dot -0.749; [f054d2ca-7cb9-40d2-9963-bcf5ff54c8fb = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.18023824878909178, 0.16333927691167438, 0.14768433103082743, 0.13320183251894238
LBFGS Accumulation History: 3 points
Removed measurement 708dfe10 to history. Total: 4
th(0)=0.13320183251894238;dx=-4.150180554690958E-8
Armijo: th(7501714.677640614)=0.15716115043254672; dx=-1.1287714767784533E-9 evalInputDelta=-0.02395931791360434
New Minimum: 0.13320183251894238 > 0.12240438597151779
END: th(3750857.338820307)=0.12240438597151779; dx=-1.4974023415817913E-8 evalInputDelta=0.010797446547424594
Fitness changed from 0.13320183251894238 to 0.12240438597151779
Iteration 30 complete. Error: 0.12240438597151779 Total: 31.8610; Orientation: 0.1993; Line Search: 23.9329
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/7d4dc902-2317-4234-98ee-5b70e3919920.jpg)
Final threshold in iteration 31: 0.12240438597151779 (> -Infinity) after 970.674s (< 3600.000s)
0.12240438597151779