Code from BasicOptimizer.scala:75 executed in 366.77 seconds (3.713 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: 1106367665454600
Reset training subject: 1106375558690400
Adding measurement 70c29356 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=1.2844112515449524;dx=-7.752784844185299E-8
New Minimum: 1.2844112515449524 > 1.2844109237194061
WOLFE (weak): th(2.154434690031884)=1.2844109237194061; dx=-7.750383863476297E-8 evalInputDelta=3.2782554626464844E-7
New Minimum: 1.2844109237194061 > 1.2844103574752808
WOLFE (weak): th(4.308869380063768)=1.2844103574752808; dx=-7.746843161274685E-8 evalInputDelta=8.940696716308594E-7
New Minimum: 1.2844103574752808 > 1.2844087481498718
WOLFE (weak): th(12.926608140191302)=1.2844087481498718; dx=-7.750692394993856E-8 evalInputDelta=2.5033950805664062E-6
New Minimum: 1.2844087481498718 > 1.284401297569275
WOLFE (weak): th(51.70643256076521)=1.284401297569275; dx=-7.74810408126422E-8 evalInputDelta=9.953975677490234E-6
New Minimum: 1.284401297569275 > 1.2843616902828217
WOLFE (weak): th(258.53216280382605)=1.2843616902828217; dx=-7.74657887110207E-8 evalInputDelta=4.9561262130737305E-5
New Minimum: 1.2843616902828217 > 1.2841142117977142
WOLFE (weak): th(1551.1929768229563)=1.2841142117977142; dx=-7.744437539117792E-8 evalInputDelta=2.970397472381592E-4
New Minimum: 1.2841142117977142 > 1.2823341190814972
WOLFE (weak): th(10858.350837760694)=1.2823341190814972; dx=-7.745489881088591E-8 evalInputDelta=0.0020771324634552
New Minimum: 1.2823341190814972 > 1.2678579092025757
WOLFE (weak): th(86866.80670208555)=1.2678579092025757; dx=-7.690540024031976E-8 evalInputDelta=0.01655334234237671
New Minimum: 1.2678579092025757 > 1.1409063339233398
WOLFE (weak): th(781801.26031877)=1.1409063339233398; dx=-7.141233555766278E-8 evalInputDelta=0.14350491762161255
New Minimum: 1.1409063339233398 > 0.30498820543289185
END: th(7818012.6031877)=0.30498820543289185; dx=-3.1383520636744753E-8 evalInputDelta=0.9794230461120605
Fitness changed from 1.2844112515449524 to 0.30498820543289185
Iteratio
...skipping 6493 bytes...
g measurement 1a2773a8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.375e+03, gradient 5.979e-05, dot -0.775; [3eb6990f-f5ea-4314-84d5-40a4dfbf9c78 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.0787848234176636, -1.1410230696201324, -1.1814349293708801, -1.2115425914525986
LBFGS Accumulation History: 3 points
Removed measurement 36510e73 to history. Total: 4
th(0)=-1.2115425914525986;dx=-3.5614484119297752E-9
Armijo: th(2.5200000000000007E7)=-1.199589192867279; dx=9.035684108619429E-10 evalInputDelta=-0.011953398585319519
New Minimum: -1.2115425914525986 > -1.240489348769188
END: th(1.2600000000000004E7)=-1.240489348769188; dx=-8.412485712875466E-10 evalInputDelta=0.028946757316589355
Fitness changed from -1.2115425914525986 to -1.240489348769188
Iteration 9 complete. Error: -1.240489348769188 Total: 29.3832; Orientation: 0.1888; Line Search: 21.8926
Adding measurement 274fdea6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.722e+03, gradient 6.241e-05, dot -0.719; [3eb6990f-f5ea-4314-84d5-40a4dfbf9c78 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.1410230696201324, -1.1814349293708801, -1.2115425914525986, -1.240489348769188
LBFGS Accumulation History: 3 points
Removed measurement 6568f998 to history. Total: 4
th(0)=-1.240489348769188;dx=-3.8794387920458896E-9
Armijo: th(2.7145877094401743E7)=-1.1673498004674911; dx=2.2573052775762007E-9 evalInputDelta=-0.07313954830169678
New Minimum: -1.240489348769188 > -1.2562329173088074
END: th(1.3572938547200872E7)=-1.2562329173088074; dx=-1.240384883560426E-11 evalInputDelta=0.015743568539619446
Fitness changed from -1.240489348769188 to -1.2562329173088074
Iteration 10 complete. Error: -1.2562329173088074 Total: 29.8195; Orientation: 0.1855; Line Search: 22.2230
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/5ae9f1a1-fb2f-42d4-918d-51553173b461.jpg)
Final threshold in iteration 11: -1.2562329173088074 (> -Infinity) after 366.774s (< 1800.000s)
-1.2562329173088074