Code from BasicOptimizer.scala:75 executed in 3676.20 seconds (21.131 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: 995532727872500
Reset training subject: 995588135568800
Adding measurement 12de421f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=6.325349362867854;dx=-1.7352066609788396E-7
New Minimum: 6.325349362867854 > 6.325349228757403
WOLFE (weak): th(2.154434690031884)=6.325349228757403; dx=-1.7338552672508367E-7 evalInputDelta=1.341104507446289E-7
New Minimum: 6.325349228757403 > 6.325348559744588
WOLFE (weak): th(4.308869380063768)=6.325348559744588; dx=-1.734166898370039E-7 evalInputDelta=8.031232656691145E-7
New Minimum: 6.325348559744588 > 6.325346788045845
WOLFE (weak): th(12.926608140191302)=6.325346788045845; dx=-1.733716548741245E-7 evalInputDelta=2.5748220089383267E-6
New Minimum: 6.325346788045845 > 6.3253384743375385
WOLFE (weak): th(51.70643256076521)=6.3253384743375385; dx=-1.7341342009563868E-7 evalInputDelta=1.0888530315611433E-5
New Minimum: 6.3253384743375385 > 6.325293845793235
WOLFE (weak): th(258.53216280382605)=6.325293845793235; dx=-1.7340545962735597E-7 evalInputDelta=5.551707461926014E-5
New Minimum: 6.325293845793235 > 6.325015882626378
WOLFE (weak): th(1551.1929768229563)=6.325015882626378; dx=-1.7339467227565327E-7 evalInputDelta=3.334802414762805E-4
New Minimum: 6.325015882626378 > 6.323014389583504
WOLFE (weak): th(10858.350837760694)=6.323014389583504; dx=-1.7334592134510184E-7 evalInputDelta=0.0023349732843502835
New Minimum: 6.323014389583504 > 6.306709147545716
WOLFE (weak): th(86866.80670208555)=6.306709147545716; dx=-1.726710892054288E-7 evalInputDelta=0.01864021532213833
New Minimum: 6.306709147545716 > 6.161698882462813
WOLFE (weak): th(781801.26031877)=6.161698882462813; dx=-1.6514564826400038E-7 evalInputDelta=0.1636504804050407
New Minimum: 6.161698882462813 > 5.294189344506675
END: th(7818012.6031877)=5.294189344506675; dx=-6.052680237731589E-8 evalInputDelta=1.031160018361179
Fitness changed from 6.325349362867854 to 5.294189344506675
Iteration 1 complete. Error: 5.2
...skipping 10753 bytes...
n: 1.9489; Line Search: 108.5769
Adding measurement 76627cc9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.447e+03, gradient 1.299e-04, dot -0.541; [206650cf-195c-45aa-8565-8380a0522cca = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.3481024754934334, 3.3332484039750665, 3.221600816348404, 3.1938632684984993
LBFGS Accumulation History: 3 points
Removed measurement 532e02b1 to history. Total: 4
th(0)=3.1938632684984993;dx=-1.6852911323067174E-8
Armijo: th(4.873668275293421E7)=3.7701490331294965; dx=9.524169439000179E-9 evalInputDelta=-0.5762857646309971
Armijo: th(2.4368341376467105E7)=3.2609680002760926; dx=4.9890100427766676E-9 evalInputDelta=-0.06710473177759324
New Minimum: 3.1938632684984993 > 3.116430168290911
END: th(8122780.458822369)=3.116430168290911; dx=-5.852899744135105E-9 evalInputDelta=0.07743310020758853
Fitness changed from 3.1938632684984993 to 3.116430168290911
Iteration 14 complete. Error: 3.116430168290911 Total: 270.0514; Orientation: 1.8437; Line Search: 213.9531
Adding measurement 75b5b303 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.312e+03, gradient 9.020e-05, dot -0.801; [206650cf-195c-45aa-8565-8380a0522cca = 1.000/1.000e+00]
Orientation rejected. Popping history element from 3.3332484039750665, 3.221600816348404, 3.1938632684984993, 3.116430168290911
LBFGS Accumulation History: 3 points
Removed measurement 784649a6 to history. Total: 4
th(0)=3.116430168290911;dx=-8.12723220579482E-9
New Minimum: 3.116430168290911 > 3.077095981742607
END: th(1.750000000000001E7)=3.077095981742607; dx=-3.668318471899605E-9 evalInputDelta=0.03933418654830367
Fitness changed from 3.116430168290911 to 3.077095981742607
Iteration 15 complete. Error: 3.077095981742607 Total: 161.8097; Orientation: 1.8061; Line Search: 107.0110
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/7a621b18-145e-4c65-b47b-cff360d3af99.jpg)
Final threshold in iteration 15: 3.077095981742607 (> -Infinity) after 3676.198s (< 3600.000s)
3.077095981742607