Code from BasicOptimizer.scala:75 executed in 1003.56 seconds (6.691 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: 736883195880500
Reset training subject: 736907520233800
Adding measurement 37cfda1c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=1.5695159435272217;dx=-7.5232103648777E-8
New Minimum: 1.5695159435272217 > 1.5695157051086426
WOLFE (weak): th(2.154434690031884)=1.5695157051086426; dx=-6.902013880053157E-8 evalInputDelta=2.384185791015625E-7
New Minimum: 1.5695157051086426 > 1.569515347480774
WOLFE (weak): th(4.308869380063768)=1.569515347480774; dx=-6.901156673805668E-8 evalInputDelta=5.960464477539062E-7
New Minimum: 1.569515347480774 > 1.5695137977600098
WOLFE (weak): th(12.926608140191302)=1.5695137977600098; dx=-6.901421403907716E-8 evalInputDelta=2.1457672119140625E-6
New Minimum: 1.5695137977600098 > 1.5695078261196613
WOLFE (weak): th(51.70643256076521)=1.5695078261196613; dx=-6.901346358108061E-8 evalInputDelta=8.11740756034851E-6
New Minimum: 1.5695078261196613 > 1.5694757178425789
WOLFE (weak): th(258.53216280382605)=1.5694757178425789; dx=-6.900214662793288E-8 evalInputDelta=4.022568464279175E-5
New Minimum: 1.5694757178425789 > 1.5692753195762634
WOLFE (weak): th(1551.1929768229563)=1.5692753195762634; dx=-6.90057998966265E-8 evalInputDelta=2.4062395095825195E-4
New Minimum: 1.5692753195762634 > 1.5678326487541199
WOLFE (weak): th(10858.350837760694)=1.5678326487541199; dx=-6.890349626377578E-8 evalInputDelta=0.0016832947731018066
New Minimum: 1.5678326487541199 > 1.556123562157154
WOLFE (weak): th(86866.80670208555)=1.556123562157154; dx=-6.812561943194743E-8 evalInputDelta=0.013392381370067596
New Minimum: 1.556123562157154 > 1.4563330113887787
END: th(781801.26031877)=1.4563330113887787; dx=-5.95355856047755E-8 evalInputDelta=0.113182932138443
Fitness changed from 1.5695159435272217 to 1.4563330113887787
Iteration 1 complete. Error: 1.4563330113887787 Total: 297.1147; Orientation: 0.0190; Line Search: 227.0398
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/1d9d2f2e-14f4-4
...skipping 5580 bytes...
Adding measurement 2513155a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.491e+03, gradient 9.189e-05, dot -0.460; [b5e630a2-adad-44e9-9c35-6b91f17c09a4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.6323356628417969, 0.3906683176755905, 0.3169483244419098, 0.22435563057661057
LBFGS Accumulation History: 3 points
Removed measurement 1410d645 to history. Total: 4
th(0)=0.22435563057661057;dx=-8.442229646705096E-9
Armijo: th(6.048000000000001E7)=0.7805405035614967; dx=5.077068260418887E-9 evalInputDelta=-0.5561848729848862
Armijo: th(3.0240000000000004E7)=0.3580963760614395; dx=4.4260676849536635E-9 evalInputDelta=-0.13374074548482895
New Minimum: 0.22435563057661057 > 0.16978716477751732
END: th(1.0080000000000002E7)=0.16978716477751732; dx=-3.162118494236044E-10 evalInputDelta=0.054568465799093246
Fitness changed from 0.22435563057661057 to 0.16978716477751732
Iteration 9 complete. Error: 0.16978716477751732 Total: 112.1724; Orientation: 0.6112; Line Search: 88.9749
Adding measurement 608b35fa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.236e+03, gradient 5.475e-05, dot -0.697; [b5e630a2-adad-44e9-9c35-6b91f17c09a4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.3906683176755905, 0.3169483244419098, 0.22435563057661057, 0.16978716477751732
LBFGS Accumulation History: 3 points
Removed measurement 984de01 to history. Total: 4
th(0)=0.16978716477751732;dx=-2.9952523460886606E-9
New Minimum: 0.16978716477751732 > 0.09662393108010292
END: th(2.1716701675521392E7)=0.09662393108010292; dx=-1.10576446939709E-9 evalInputDelta=0.0731632336974144
Fitness changed from 0.16978716477751732 to 0.09662393108010292
Iteration 10 complete. Error: 0.09662393108010292 Total: 68.2843; Orientation: 0.6098; Line Search: 44.8863
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/6068bf21-f615-416c-8a3a-a07b0d59e3da.jpg)
Final threshold in iteration 11: 0.09662393108010292 (> -Infinity) after 1003.559s (< 1800.000s)
0.09662393108010292