Code from BasicOptimizer.scala:75 executed in 943.06 seconds (8.463 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: 980482785882600
Reset training subject: 980491262413100
Adding measurement 3cd26422 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=12.509232361048982;dx=-3.0513959008177653E-5
New Minimum: 12.509232361048982 > 12.50915860935502
WOLFE (weak): th(2.154434690031884)=12.50915860935502; dx=-3.0517330358080287E-5 evalInputDelta=7.375169396084402E-5
New Minimum: 12.50915860935502 > 12.509083930110918
WOLFE (weak): th(4.308869380063768)=12.509083930110918; dx=-3.0489459501732893E-5 evalInputDelta=1.484309380632709E-4
New Minimum: 12.509083930110918 > 12.508786250557142
WOLFE (weak): th(12.926608140191302)=12.508786250557142; dx=-3.0491011758491086E-5 evalInputDelta=4.461104918398462E-4
New Minimum: 12.508786250557142 > 12.507446402935612
WOLFE (weak): th(51.70643256076521)=12.507446402935612; dx=-3.048169321186768E-5 evalInputDelta=0.001785958113369901
New Minimum: 12.507446402935612 > 12.500310782813882
WOLFE (weak): th(258.53216280382605)=12.500310782813882; dx=-3.041162636520499E-5 evalInputDelta=0.008921578235099759
New Minimum: 12.500310782813882 > 12.455946094103634
WOLFE (weak): th(1551.1929768229563)=12.455946094103634; dx=-3.0045197717708523E-5 evalInputDelta=0.05328626694534755
New Minimum: 12.455946094103634 > 12.146653897957043
WOLFE (weak): th(10858.350837760694)=12.146653897957043; dx=-2.8207203773735684E-5 evalInputDelta=0.3625784630919391
New Minimum: 12.146653897957043 > 10.258375007860815
END: th(86866.80670208555)=10.258375007860815; dx=-1.594166817283991E-5 evalInputDelta=2.2508573531881666
Fitness changed from 12.509232361048982 to 10.258375007860815
Iteration 1 complete. Error: 10.258375007860815 Total: 93.4247; Orientation: 0.0240; Line Search: 69.3352
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/71462899-9585-4759-8639-a0741c2e30ba.jpg)
Adding measurement 7b2ccba5 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=10.258375007860815;dx=-1.174560298922682
...skipping 24009 bytes...
3, gradient 2.146e-04, dot -0.515; [9057e7da-db0e-4741-9084-800106f70e0e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.5157579050903758, 0.47518796779935, 0.4336798720464654, 0.4285296959807301
LBFGS Accumulation History: 3 points
Removed measurement 446e7065 to history. Total: 4
th(0)=0.4285296959807301;dx=-4.5978231198759306E-8
Armijo: th(2.0891925048411462E7)=1.7060549374697325; dx=6.471017598635602E-8 evalInputDelta=-1.2775252414890024
Armijo: th(1.0445962524205731E7)=0.7110593194729788; dx=4.373718271641877E-8 evalInputDelta=-0.28252962349224875
New Minimum: 0.4285296959807301 > 0.35279034897609574
END: th(3481987.508068577)=0.35279034897609574; dx=-2.4436918077128426E-9 evalInputDelta=0.07573934700463436
Fitness changed from 0.4285296959807301 to 0.35279034897609574
Iteration 29 complete. Error: 0.35279034897609574 Total: 38.6548; Orientation: 0.2353; Line Search: 30.7502
Adding measurement 5b29ab61 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.571e+03, gradient 1.627e-04, dot -0.609; [9057e7da-db0e-4741-9084-800106f70e0e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.47518796779935, 0.4336798720464654, 0.4285296959807301, 0.35279034897609574
LBFGS Accumulation History: 3 points
Removed measurement 7e3236d to history. Total: 4
th(0)=0.35279034897609574;dx=-2.6415734604662332E-8
Armijo: th(7501714.677640616)=0.3552506869795855; dx=9.766091018676804E-9 evalInputDelta=-0.0024603380034897704
New Minimum: 0.35279034897609574 > 0.30683695020976254
END: th(3750857.338820308)=0.30683695020976254; dx=-6.124299213683431E-9 evalInputDelta=0.0459533987663332
Fitness changed from 0.35279034897609574 to 0.30683695020976254
Iteration 30 complete. Error: 0.30683695020976254 Total: 31.1150; Orientation: 0.2512; Line Search: 22.9856
<a id="p-21"></a>Iteration 30
<a id="p-20"></a>![Iteration 30](etc/779d6060-a49c-49b3-b8ef-e6bf60423f42.jpg)
Final threshold in iteration 31: 0.30683695020976254 (> -Infinity) after 943.042s (< 3600.000s)
0.30683695020976254