BasicOptimizer.scala:89 executed in 129.33 seconds (1.510 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: 35680220121600
Reset training subject: 35682901609300
Adding measurement 25680992 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-83.17760912281145;dx=-4.9894252284644016E-6
New Minimum: -83.17760912281145 > -83.177613236767
END: th(2.154434690031884)=-83.177613236767; dx=-3.3497393958942806E-6 evalInputDelta=4.113955554885251E-6
Fitness changed from -83.17760912281145 to -83.177613236767
Iteration 1 complete. Error: -83.177613236767 Total: 12.7091; Orientation: 0.0606; Line Search: 4.9881
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/08f60252-a348-4fbe-855a-d17c66b92543.jpg)
Adding measurement 745b4c72 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-83.177613236767;dx=-3.3203497864935146E-6
New Minimum: -83.177613236767 > -83.17763380654168
WOLFE (weak): th(4.641588833612779)=-83.17763380654168; dx=-3.3184765358053274E-6 evalInputDelta=2.056977467645993E-5
New Minimum: -83.17763380654168 > -83.17765026235777
WOLFE (weak): th(9.283177667225559)=-83.17765026235777; dx=-3.3174929206016506E-6 evalInputDelta=3.702559077112255E-5
New Minimum: -83.17765026235777 > -83.1777201995398
WOLFE (weak): th(27.849533001676676)=-83.1777201995398; dx=-3.3153730252394384E-6 evalInputDelta=1.0696277280430877E-4
New Minimum: -83.1777201995398 > -83.17803697309856
WOLFE (weak): th(111.3981320067067)=-83.17803697309856; dx=-3.3125483862798987E-6 evalInputDelta=4.237363315553466E-4
New Minimum: -83.17803697309856 > -83.17973189683872
WOLFE (weak): th(556.9906600335335)=-83.17973189683872; dx=-3.3121715182878146E-6 evalInputDelta=0.0021186600717157944
New Minimum: -83.17973189683872 > -83.19030793452971
WOLFE (weak): th(3341.9439602012008)=-83.19030793452971; dx=-3.312501126840238E-6 evalInputDelta=0.012694697762711371
New Minimum: -83.19030793452971 > -83.26641492950219
WOLFE (weak): th(23393.607721408407)=-83.26641492950219; dx=-3.3081775387313507E-6 evalInputDelta=0.08880169273518845
New Minimum: -83.26641492950219 > -83.88310616141676
WOLFE (weak): th(187148.86177126726)=-83.88310616141676; dx=-3.259494759311575E-6 evalInputDelta=0.7054929246497608
New Minimum: -83.88310616141676 > -89.02858025270571
END: th(1684339.7559414054)=-89.02858025270571; dx=-2.700623270368806E-6 evalInputDelta=5.850967015938707
Fitness changed from -83.177613236767 to -89.02858025270571
Iteration 2 complete. Error: -89.02858025270571 Total: 28.6400; Orientation: 0.0616; Line Search: 25.5073
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/f78e79f2-e68a-435f-91b9-d69292129dfd.jpg)
Adding measurement 328c1fa2 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-89.02858025270571;dx=-2.6482402051362075E-6
New Minimum: -89.02858025270571 > -97.581374468644
END: th(3628800.0000000005)=-97.581374468644; dx=-1.5892871142405356E-6 evalInputDelta=8.552794215938292
Fitness changed from -89.02858025270571 to -97.581374468644
Iteration 3 complete. Error: -97.581374468644 Total: 8.3129; Orientation: 0.0612; Line Search: 5.2521
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/a196cb99-8a98-4560-b99d-e354adf1f668.jpg)
Adding measurement 226b7035 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.259e+04, gradient 1.276e-03, dot -0.736; [838101b2-1fa3-4c81-8bb8-ccac45404833 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -97.581374468644, -89.02858025270571, -83.177613236767, -83.17760912281145
LBFGS Accumulation History: 3 points
Removed measurement 226b7035 to history. Total: 3
th(0)=-97.581374468644;dx=-1.6275457893837998E-6
New Minimum: -97.581374468644 > -108.01201645775603
END: th(7818012.603187701)=-108.01201645775603; dx=-7.581927011300434E-7 evalInputDelta=10.430641989112033
Fitness changed from -97.581374468644 to -108.01201645775603
Iteration 4 complete. Error: -108.01201645775603 Total: 9.1872; Orientation: 1.0669; Line Search: 5.0371
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/399ffa66-2630-4d37-8a77-51ef20b1e461.jpg)
Adding measurement 4188cad7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.366e+04, gradient 1.169e-03, dot -0.519; [838101b2-1fa3-4c81-8bb8-ccac45404833 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -108.01201645775603, -89.02858025270571, -83.177613236767, -83.17760912281145
LBFGS Accumulation History: 3 points
Removed measurement 4188cad7 to history. Total: 3
th(0)=-108.01201645775603;dx=-1.367138484553884E-6
New Minimum: -108.01201645775603 > -114.09706806612189
WOLF (strong): th(1.6843397559414055E7)=-114.09706806612189; dx=1.781318706837544E-7 evalInputDelta=6.085051608365859
New Minimum: -114.09706806612189 > -114.45741124358881
END: th(8421698.779707028)=-114.45741124358881; dx=-2.0568645837472645E-7 evalInputDelta=6.445394785832775
Fitness changed from -108.01201645775603 to -114.45741124358881
Iteration 5 complete. Error: -114.45741124358881 Total: 12.0313; Orientation: 1.0432; Line Search: 7.8080
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d683250b-2c36-496b-b852-59c82ec0f84a.jpg)
Adding measurement 6333cae9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.483e+04, gradient 1.335e-03, dot -0.394; [838101b2-1fa3-4c81-8bb8-ccac45404833 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -114.45741124358881, -89.02858025270571, -83.177613236767, -83.17760912281145
LBFGS Accumulation History: 3 points
Removed measurement 6333cae9 to history. Total: 3
th(0)=-114.45741124358881;dx=-1.7812874050796958E-6
Armijo: th(1.8144000000000004E7)=-110.63076812948658; dx=7.704722267184527E-7 evalInputDelta=-3.8266431141022252
New Minimum: -114.45741124358881 > -118.50916937021829
WOLF (strong): th(9072000.000000002)=-118.50916937021829; dx=5.393117786652055E-7 evalInputDelta=4.05175812662948
New Minimum: -118.50916937021829 > -118.93715937959905
END: th(3024000.0000000005)=-118.93715937959905; dx=-7.915817428943151E-7 evalInputDelta=4.479748136010244
Fitness changed from -114.45741124358881 to -118.93715937959905
Iteration 6 complete. Error: -118.93715937959905 Total: 14.5677; Orientation: 1.0636; Line Search: 10.5578
Adding measurement 7030728d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.262e+04, gradient 9.030e-04, dot -0.681; [838101b2-1fa3-4c81-8bb8-ccac45404833 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -118.93715937959905, -89.02858025270571, -83.177613236767, -83.17760912281145
LBFGS Accumulation History: 3 points
Removed measurement 7030728d to history. Total: 3
th(0)=-118.93715937959905;dx=-8.134141777940951E-7
New Minimum: -118.93715937959905 > -123.61548859223792
END: th(6515010.502656418)=-123.61548859223792; dx=-4.940091784711044E-7 evalInputDelta=4.678329212638872
Fitness changed from -118.93715937959905 to -123.61548859223792
Iteration 7 complete. Error: -123.61548859223792 Total: 8.9866; Orientation: 1.0284; Line Search: 5.4726
Adding measurement 329930b0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.563e+04, gradient 9.057e-04, dot -0.623; [838101b2-1fa3-4c81-8bb8-ccac45404833 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -123.61548859223792, -89.02858025270571, -83.177613236767, -83.17760912281145
LBFGS Accumulation History: 3 points
Removed measurement 329930b0 to history. Total: 3
th(0)=-123.61548859223792;dx=-8.19545571021466E-7
New Minimum: -123.61548859223792 > -128.6405556733378
END: th(1.4036164632845048E7)=-128.6405556733378; dx=-5.620172430873895E-8 evalInputDelta=5.025067081099863
Fitness changed from -123.61548859223792 to -128.6405556733378
Iteration 8 complete. Error: -128.6405556733378 Total: 9.3453; Orientation: 1.3573; Line Search: 5.3495
Adding measurement 2a1cb5a2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.031e+04, gradient 1.308e-03, dot -0.289; [838101b2-1fa3-4c81-8bb8-ccac45404833 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -128.6405556733378, -89.02858025270571, -83.177613236767, -83.17760912281145
LBFGS Accumulation History: 3 points
Removed measurement 2a1cb5a2 to history. Total: 3
th(0)=-128.6405556733378;dx=-1.7118451390698898E-6
Armijo: th(3.024000000000001E7)=-107.27745509140111; dx=8.255293676562897E-7 evalInputDelta=-21.363100581936678
Armijo: th(1.5120000000000006E7)=-125.24332375787017; dx=1.0773376652414831E-6 evalInputDelta=-3.3972319154676143
New Minimum: -128.6405556733378 > -134.21047755299657
END: th(5040000.000000002)=-134.21047755299657; dx=-1.453240412427039E-7 evalInputDelta=5.569921879658779
Fitness changed from -128.6405556733378 to -134.21047755299657
Iteration 9 complete. Error: -134.21047755299657 Total: 13.8864; Orientation: 1.0222; Line Search: 10.3014
Adding measurement 5bfd21f6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.922e+04, gradient 8.721e-04, dot -0.515; [838101b2-1fa3-4c81-8bb8-ccac45404833 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -134.21047755299657, -89.02858025270571, -83.177613236767, -83.17760912281145
LBFGS Accumulation History: 3 points
Removed measurement 5bfd21f6 to history. Total: 3
th(0)=-134.21047755299657;dx=-7.601445655938517E-7
New Minimum: -134.21047755299657 > -136.89011321552505
WOLF (strong): th(1.0858350837760698E7)=-136.89011321552505; dx=1.4390865426576277E-7 evalInputDelta=2.679635662528483
New Minimum: -136.89011321552505 > -137.00589696598104
END: th(5429175.418880349)=-137.00589696598104; dx=-1.9608685188445035E-7 evalInputDelta=2.7954194129844723
Fitness changed from -134.21047755299657 to -137.00589696598104
Iteration 10 complete. Error: -137.00589696598104 Total: 11.2316; Orientation: 1.0193; Line Search: 7.7037
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/7fc23102-e16a-40ec-9f9d-c4a4cd6f5605.jpg)
Final threshold in iteration 11: -137.00589696598104 (> -Infinity) after 129.331s (< 5400.000s)
Returns
-137.00589696598104