Code from BasicOptimizer.scala:75 executed in 102.29 seconds (2.029 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: 1106231229115000
Reset training subject: 1106234240566600
Adding measurement 16a2ed51 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=13.410491339862347;dx=-4.302100306752162E-5
New Minimum: 13.410491339862347 > 13.410303987562656
WOLFE (weak): th(2.154434690031884)=13.410303987562656; dx=-4.294847136672918E-5 evalInputDelta=1.8735229969024658E-4
New Minimum: 13.410303987562656 > 13.4101159311831
WOLFE (weak): th(4.308869380063768)=13.4101159311831; dx=-4.301181143826698E-5 evalInputDelta=3.7540867924690247E-4
New Minimum: 13.4101159311831 > 13.409363716840744
WOLFE (weak): th(12.926608140191302)=13.409363716840744; dx=-4.299499268151056E-5 evalInputDelta=0.0011276230216026306
New Minimum: 13.409363716840744 > 13.405979989096522
WOLFE (weak): th(51.70643256076521)=13.405979989096522; dx=-4.305657159409394E-5 evalInputDelta=0.004511350765824318
New Minimum: 13.405979989096522 > 13.387978695333004
WOLFE (weak): th(258.53216280382605)=13.387978695333004; dx=-4.314159040046093E-5 evalInputDelta=0.02251264452934265
New Minimum: 13.387978695333004 > 13.276432994753122
WOLFE (weak): th(1551.1929768229563)=13.276432994753122; dx=-4.218886236602098E-5 evalInputDelta=0.13405834510922432
New Minimum: 13.276432994753122 > 12.534616608172655
END: th(10858.350837760694)=12.534616608172655; dx=-3.714338119172679E-5 evalInputDelta=0.8758747316896915
Fitness changed from 13.410491339862347 to 12.534616608172655
Iteration 1 complete. Error: 12.534616608172655 Total: 29.1350; Orientation: 0.0233; Line Search: 20.8628
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/27889ba1-2af1-45b9-a17b-fc82a522c72e.jpg)
Adding measurement 41fa769c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=12.534616608172655;dx=-3.4142901965640624E-5
New Minimum: 12.534616608172655 > 11.250735729932785
END: th(23393.607721408407)=11.250735729932785; dx=-2.2705612039836984E-5 evalInputDelta=1.28388087823987
Fitness
...skipping 4892 bytes...
8 Total: 7.7558; Orientation: 0.0585; Line Search: 5.2346
Adding measurement 32f1fafe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.320e+03, gradient 4.037e-04, dot -0.984; [b391e251-ea3c-4f57-bf41-25634184a10d = 1.000/1.000e+00]
Orientation rejected. Popping history element from 7.117246642708778, 5.226094618439674, 3.0769885927438736, 1.3283250033855438
LBFGS Accumulation History: 3 points
Removed measurement 35c4697c to history. Total: 4
th(0)=1.3283250033855438;dx=-1.6235523740297684E-7
New Minimum: 1.3283250033855438 > 0.3025034964084625
END: th(5040000.000000002)=0.3025034964084625; dx=-4.9977684564066025E-8 evalInputDelta=1.0258215069770813
Fitness changed from 1.3283250033855438 to 0.3025034964084625
Iteration 9 complete. Error: 0.3025034964084625 Total: 8.2314; Orientation: 0.0572; Line Search: 5.4458
Adding measurement 6d672bd4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.243e+03, gradient 2.261e-04, dot -0.935; [b391e251-ea3c-4f57-bf41-25634184a10d = 1.000/1.000e+00]
Orientation rejected. Popping history element from 5.226094618439674, 3.0769885927438736, 1.3283250033855438, 0.3025034964084625
LBFGS Accumulation History: 3 points
Removed measurement f25f48a to history. Total: 4
th(0)=0.3025034964084625;dx=-5.094984705213892E-8
New Minimum: 0.3025034964084625 > -0.0023058950901031494
WOLF (strong): th(1.0858350837760698E7)=-0.0023058950901031494; dx=4.848982616925708E-9 evalInputDelta=0.3048093914985657
New Minimum: -0.0023058950901031494 > -0.011682868003845215
END: th(5429175.418880349)=-0.011682868003845215; dx=-1.4253255166917097E-8 evalInputDelta=0.31418636441230774
Fitness changed from 0.3025034964084625 to -0.011682868003845215
Iteration 10 complete. Error: -0.011682868003845215 Total: 10.3872; Orientation: 0.0557; Line Search: 7.8302
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/597727e1-6205-431f-a230-1efe9dbda94b.jpg)
Final threshold in iteration 11: -0.011682868003845215 (> -Infinity) after 102.281s (< 1800.000s)
-0.011682868003845215