BasicOptimizer.scala:89 executed in 129.02 seconds (1.896 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
val trainer = new IterativeTrainer(trainable)
trainer.setOrientation(orientation())
trainer.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = {
trainingMonitor.log(msg)
BasicOptimizer.this.log(msg)
}
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[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.addRef().asInstanceOf[Trainable], currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
trainer.setMaxIterations(trainingIterations)
trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
val result = trainer.run.asInstanceOf[lang.Double]
trainer.freeRef()
result
Reset training subject: 36603768232400
Reset training subject: 36606504941500
Adding measurement 33c2044f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-84.64111741559937;dx=-5.047930352355013E-6
New Minimum: -84.64111741559937 > -84.64112550124354
END: th(2.154434690031884)=-84.64112550124354; dx=-3.3450075441357235E-6 evalInputDelta=8.085644168431827E-6
Fitness changed from -84.64111741559937 to -84.64112550124354
Iteration 1 complete. Error: -84.64112550124354 Total: 12.7950; Orientation: 0.0611; Line Search: 4.9298
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8a33cb6b-27cc-4faa-9b7d-209fd21a2d42.jpg)
Adding measurement 591f14 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-84.64112550124354;dx=-3.3165192332368144E-6
New Minimum: -84.64112550124354 > -84.64114571535058
WOLFE (weak): th(4.641588833612779)=-84.64114571535058; dx=-3.3150555314880705E-6 evalInputDelta=2.0214107038896145E-5
New Minimum: -84.64114571535058 > -84.64115784381248
WOLFE (weak): th(9.283177667225559)=-84.64115784381248; dx=-3.313359664064125E-6 evalInputDelta=3.234256894302234E-5
New Minimum: -84.64115784381248 > -84.6412306145474
WOLFE (weak): th(27.849533001676676)=-84.6412306145474; dx=-3.3115478480812274E-6 evalInputDelta=1.0511330386009377E-4
New Minimum: -84.6412306145474 > -84.64154999647747
WOLFE (weak): th(111.3981320067067)=-84.64154999647747; dx=-3.3092226067382507E-6 evalInputDelta=4.2449523392917854E-4
New Minimum: -84.64154999647747 > -84.64323582796185
WOLFE (weak): th(556.9906600335335)=-84.64323582796185; dx=-3.3085845707610266E-6 evalInputDelta=0.002110326718309352
New Minimum: -84.64323582796185 > -84.65378263021378
WOLFE (weak): th(3341.9439602012008)=-84.65378263021378; dx=-3.3085648365140206E-6 evalInputDelta=0.012657128970246845
New Minimum: -84.65378263021378 > -84.7296816596336
WOLFE (weak): th(23393.607721408407)=-84.7296816596336; dx=-3.3046936934481967E-6 evalInputDelta=0.08855615839006248
New Minimum: -84.7296816596336 > -85.34492110339814
WOLFE (weak): th(187148.86177126726)=-85.34492110339814; dx=-3.256904689715899E-6 evalInputDelta=0.7037956021545995
New Minimum: -85.34492110339814 > -90.4772640660866
END: th(1684339.7559414054)=-90.4772640660866; dx=-2.699845360272267E-6 evalInputDelta=5.836138564843068
Fitness changed from -84.64112550124354 to -90.4772640660866
Iteration 2 complete. Error: -90.4772640660866 Total: 28.8392; Orientation: 0.0629; Line Search: 25.7173
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/677bc939-9796-44a3-83e1-2c2ad14270a3.jpg)
Adding measurement 1bbd51a9 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-90.4772640660866;dx=-2.66364297435212E-6
New Minimum: -90.4772640660866 > -99.12196078986804
END: th(3628800.0000000005)=-99.12196078986804; dx=-1.6201991222855943E-6 evalInputDelta=8.644696723781436
Fitness changed from -90.4772640660866 to -99.12196078986804
Iteration 3 complete. Error: -99.12196078986804 Total: 8.4048; Orientation: 0.0601; Line Search: 5.2424
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/8706ba1b-c61a-40fc-bab2-1e9384f2a38c.jpg)
Adding measurement 2fbada1d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.351e+04, gradient 1.288e-03, dot -0.746; [39b9c3cd-c568-4f9c-8c9a-2a9626311cb6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -99.12196078986804, -90.4772640660866, -84.64112550124354, -84.64111741559937
LBFGS Accumulation History: 3 points
Removed measurement 2fbada1d to history. Total: 3
th(0)=-99.12196078986804;dx=-1.6583020413010384E-6
New Minimum: -99.12196078986804 > -109.7761297322575
END: th(7818012.603187701)=-109.7761297322575; dx=-7.880371997377704E-7 evalInputDelta=10.654168942389461
Fitness changed from -99.12196078986804 to -109.7761297322575
Iteration 4 complete. Error: -109.7761297322575 Total: 9.3227; Orientation: 1.0513; Line Search: 5.2083
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/707a1ade-f64b-4c6b-adb6-4f6e7adf939f.jpg)
Adding measurement 3bbdc2f3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.413e+04, gradient 1.173e-03, dot -0.531; [39b9c3cd-c568-4f9c-8c9a-2a9626311cb6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -109.7761297322575, -90.4772640660866, -84.64112550124354, -84.64111741559937
LBFGS Accumulation History: 3 points
Removed measurement 3bbdc2f3 to history. Total: 3
th(0)=-109.7761297322575;dx=-1.3742712774028182E-6
New Minimum: -109.7761297322575 > -116.25948648910678
WOLF (strong): th(1.6843397559414055E7)=-116.25948648910678; dx=1.5967358554372636E-7 evalInputDelta=6.483356756849275
New Minimum: -116.25948648910678 > -116.35528743815793
END: th(8421698.779707028)=-116.35528743815793; dx=-2.3038284112230437E-7 evalInputDelta=6.579157705900428
Fitness changed from -109.7761297322575 to -116.35528743815793
Iteration 5 complete. Error: -116.35528743815793 Total: 11.7956; Orientation: 1.0600; Line Search: 7.6353
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/146f2ce9-6d96-4763-bac2-f3c47d63ca70.jpg)
Adding measurement 56413ecc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.521e+04, gradient 1.323e-03, dot -0.397; [39b9c3cd-c568-4f9c-8c9a-2a9626311cb6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -116.35528743815793, -90.4772640660866, -84.64112550124354, -84.64111741559937
LBFGS Accumulation History: 3 points
Removed measurement 56413ecc to history. Total: 3
th(0)=-116.35528743815793;dx=-1.7485068924380212E-6
Armijo: th(1.8144000000000004E7)=-113.28230143951166; dx=7.309481439163679E-7 evalInputDelta=-3.072985998646274
New Minimum: -116.35528743815793 > -120.59996585867644
WOLF (strong): th(9072000.000000002)=-120.59996585867644; dx=4.986708814528808E-7 evalInputDelta=4.244678420518511
New Minimum: -120.59996585867644 > -120.76049495025842
END: th(3024000.0000000005)=-120.76049495025842; dx=-7.971388624592247E-7 evalInputDelta=4.405207512100489
Fitness changed from -116.35528743815793 to -120.76049495025842
Iteration 6 complete. Error: -120.76049495025842 Total: 14.9366; Orientation: 1.0422; Line Search: 10.8723
Adding measurement 19c3f938 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.281e+04, gradient 9.043e-04, dot -0.681; [39b9c3cd-c568-4f9c-8c9a-2a9626311cb6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -120.76049495025842, -90.4772640660866, -84.64112550124354, -84.64111741559937
LBFGS Accumulation History: 3 points
Removed measurement 19c3f938 to history. Total: 3
th(0)=-120.76049495025842;dx=-8.168399968236324E-7
New Minimum: -120.76049495025842 > -125.45132232751264
END: th(6515010.502656418)=-125.45132232751264; dx=-4.953389864771101E-7 evalInputDelta=4.690827377254223
Fitness changed from -120.76049495025842 to -125.45132232751264
Iteration 7 complete. Error: -125.45132232751264 Total: 8.9759; Orientation: 1.0029; Line Search: 5.2228
Adding measurement 45727cc4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.543e+04, gradient 9.131e-04, dot -0.617; [39b9c3cd-c568-4f9c-8c9a-2a9626311cb6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -125.45132232751264, -90.4772640660866, -84.64112550124354, -84.64111741559937
LBFGS Accumulation History: 3 points
Removed measurement 45727cc4 to history. Total: 3
th(0)=-125.45132232751264;dx=-8.31902868541195E-7
New Minimum: -125.45132232751264 > -130.393290821149
END: th(1.4036164632845048E7)=-130.393290821149; dx=-4.730473048801715E-8 evalInputDelta=4.941968493636367
Fitness changed from -125.45132232751264 to -130.393290821149
Iteration 8 complete. Error: -130.393290821149 Total: 8.7015; Orientation: 1.0483; Line Search: 5.2158
Adding measurement 66ffef85 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.042e+04, gradient 1.315e-03, dot -0.289; [39b9c3cd-c568-4f9c-8c9a-2a9626311cb6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -130.393290821149, -90.4772640660866, -84.64112550124354, -84.64111741559937
LBFGS Accumulation History: 3 points
Removed measurement 66ffef85 to history. Total: 3
th(0)=-130.393290821149;dx=-1.7287384218618308E-6
Armijo: th(3.024000000000001E7)=-110.42902720566511; dx=7.992207150746672E-7 evalInputDelta=-19.9642636154839
Armijo: th(1.5120000000000006E7)=-127.68121559054578; dx=1.0468294884490135E-6 evalInputDelta=-2.712075230603233
New Minimum: -130.393290821149 > -136.16329556967295
END: th(5040000.000000002)=-136.16329556967295; dx=-1.990589866603433E-7 evalInputDelta=5.770004748523945
Fitness changed from -130.393290821149 to -136.16329556967295
Iteration 9 complete. Error: -136.16329556967295 Total: 13.6076; Orientation: 1.0528; Line Search: 10.1051
Adding measurement 52215430 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.926e+04, gradient 8.720e-04, dot -0.520; [39b9c3cd-c568-4f9c-8c9a-2a9626311cb6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -136.16329556967295, -90.4772640660866, -84.64112550124354, -84.64111741559937
LBFGS Accumulation History: 3 points
Removed measurement 52215430 to history. Total: 3
th(0)=-136.16329556967295;dx=-7.601578864430137E-7
New Minimum: -136.16329556967295 > -139.0933472621273
WOLF (strong): th(1.0858350837760698E7)=-139.0933472621273; dx=1.1890198211018875E-7 evalInputDelta=2.930051692454356
END: th(5429175.418880349)=-139.04075922614786; dx=-2.185509682806338E-7 evalInputDelta=2.8774636564749017
Fitness changed from -136.16329556967295 to -139.0933472621273
Iteration 10 complete. Error: -139.0933472621273 Total: 11.1282; Orientation: 1.0627; Line Search: 7.6345
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/83d4ed71-2409-4a12-8393-ff0a5103afd6.jpg)
Final threshold in iteration 11: -139.0933472621273 (> -Infinity) after 129.020s (< 5400.000s)
Returns
-139.0933472621273