BasicOptimizer.scala:89 executed in 208.27 seconds (2.900 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: 16370912344805
Reset training subject: 16375197288718
Adding measurement 6d927fc5 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.40318332612514496;dx=-6.928602862469776E-7
New Minimum: -0.40318332612514496 > -0.4031839221715927
END: th(2.154434690031884)=-0.4031839221715927; dx=-6.050152369387754E-7 evalInputDelta=5.960464477539062E-7
Fitness changed from -0.40318332612514496 to -0.4031839221715927
Iteration 1 complete. Error: -0.4031839221715927 Total: 22.1549; Orientation: 0.0445; Line Search: 8.5173
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/bef7bdf4-5b2e-4e94-abbd-431b864a30cf.jpg)
Adding measurement 169f401a to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.4031839221715927;dx=-6.050203248082809E-7
New Minimum: -0.4031839221715927 > -0.4031853675842285
WOLFE (weak): th(4.641588833612779)=-0.4031853675842285; dx=-6.05010205522321E-7 evalInputDelta=1.4454126358032227E-6
New Minimum: -0.4031853675842285 > -0.4031868427991867
WOLFE (weak): th(9.283177667225559)=-0.4031868427991867; dx=-6.05012408803141E-7 evalInputDelta=2.9206275939941406E-6
New Minimum: -0.4031868427991867 > -0.4031924307346344
WOLFE (weak): th(27.849533001676676)=-0.4031924307346344; dx=-6.050100517901291E-7 evalInputDelta=8.508563041687012E-6
New Minimum: -0.4031924307346344 > -0.4032176584005356
WOLFE (weak): th(111.3981320067067)=-0.4032176584005356; dx=-6.049982429186415E-7 evalInputDelta=3.3736228942871094E-5
New Minimum: -0.4032176584005356 > -0.4033525288105011
WOLFE (weak): th(556.9906600335335)=-0.4033525288105011; dx=-6.049292409798849E-7 evalInputDelta=1.6860663890838623E-4
New Minimum: -0.4033525288105011 > -0.404194638133049
WOLFE (weak): th(3341.9439602012008)=-0.404194638133049; dx=-6.044960901364494E-7 evalInputDelta=0.0010107159614562988
New Minimum: -0.404194638133049 > -0.4102359116077423
WOLFE (weak): th(23393.607721408407)=-0.4102359116077423; dx=-6.005510235229048E-7 evalInputDelta=0.007051989436149597
New Minimum: -0.4102359116077423 > -0.4581175744533539
WOLFE (weak): th(187148.86177126726)=-0.4581175744533539; dx=-5.688833288423247E-7 evalInputDelta=0.05493365228176117
New Minimum: -0.4581175744533539 > -0.774563193321228
END: th(1684339.7559414054)=-0.774563193321228; dx=-2.9660490360777557E-7 evalInputDelta=0.3713792711496353
Fitness changed from -0.4031839221715927 to -0.774563193321228
Iteration 2 complete. Error: -0.774563193321228 Total: 48.6556; Orientation: 0.0431; Line Search: 44.6003
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/692a0290-38c5-4aed-9c2d-550dbc8f8981.jpg)
Adding measurement 2fc93906 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.774563193321228;dx=-2.7801165236179175E-7
New Minimum: -0.774563193321228 > -1.1215271204710007
END: th(3628800.0000000005)=-1.1215271204710007; dx=-1.2663052629653193E-7 evalInputDelta=0.34696392714977264
Fitness changed from -0.774563193321228 to -1.1215271204710007
Iteration 3 complete. Error: -1.1215271204710007 Total: 13.3231; Orientation: 0.0439; Line Search: 8.7056
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/fb64b7fb-6d74-468c-ab0a-152de185e769.jpg)
Adding measurement 61f4abc2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.934e+03, gradient 3.836e-04, dot -0.645; [aa7d33bc-0c17-45c6-b5f5-34f0b3b50e0e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.1215271204710007, -0.774563193321228, -0.4031839221715927, -0.40318332612514496
LBFGS Accumulation History: 3 points
Removed measurement 61f4abc2 to history. Total: 3
th(0)=-1.1215271204710007;dx=-1.4717789492325586E-7
New Minimum: -1.1215271204710007 > -1.443887621164322
END: th(7818012.603187701)=-1.443887621164322; dx=-4.2026109481432676E-8 evalInputDelta=0.32236050069332123
Fitness changed from -1.1215271204710007 to -1.443887621164322
Iteration 4 complete. Error: -1.443887621164322 Total: 14.4822; Orientation: 1.0200; Line Search: 8.8093
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/0792e382-722c-41fe-b88c-0f40df8b61e3.jpg)
Adding measurement 611499b8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.741e+03, gradient 3.167e-04, dot -0.455; [aa7d33bc-0c17-45c6-b5f5-34f0b3b50e0e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.443887621164322, -0.774563193321228, -0.4031839221715927, -0.40318332612514496
LBFGS Accumulation History: 3 points
Removed measurement 611499b8 to history. Total: 3
th(0)=-1.443887621164322;dx=-1.0026763381109961E-7
New Minimum: -1.443887621164322 > -1.6477559506893158
WOLF (strong): th(1.6843397559414055E7)=-1.6477559506893158; dx=6.612895358094752E-9 evalInputDelta=0.2038683295249939
END: th(8421698.779707028)=-1.6440291702747345; dx=-1.2850742780140889E-8 evalInputDelta=0.2001415491104126
Fitness changed from -1.443887621164322 to -1.6477559506893158
Iteration 5 complete. Error: -1.6477559506893158 Total: 18.0685; Orientation: 1.0141; Line Search: 13.0515
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/cf5fe7db-ac37-4207-a2f1-3c35940d1b0f.jpg)
Adding measurement 59668ca1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.091e+03, gradient 3.309e-04, dot -0.147; [aa7d33bc-0c17-45c6-b5f5-34f0b3b50e0e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6477559506893158, -0.774563193321228, -0.4031839221715927, -0.40318332612514496
LBFGS Accumulation History: 3 points
Removed measurement 59668ca1 to history. Total: 3
th(0)=-1.6477559506893158;dx=-1.0947706430472422E-7
New Minimum: -1.6477559506893158 > -1.7733563780784607
WOLF (strong): th(1.8144000000000004E7)=-1.7733563780784607; dx=3.246345897649904E-8 evalInputDelta=0.1256004273891449
New Minimum: -1.7733563780784607 > -1.8517666459083557
END: th(9072000.000000002)=-1.8517666459083557; dx=-3.3804422763930154E-9 evalInputDelta=0.20401069521903992
Fitness changed from -1.6477559506893158 to -1.8517666459083557
Iteration 6 complete. Error: -1.8517666459083557 Total: 18.0735; Orientation: 1.0388; Line Search: 12.5318
Adding measurement 228735e7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.557e+03, gradient 2.182e-04, dot -0.268; [aa7d33bc-0c17-45c6-b5f5-34f0b3b50e0e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8517666459083557, -0.774563193321228, -0.4031839221715927, -0.40318332612514496
LBFGS Accumulation History: 3 points
Removed measurement 228735e7 to history. Total: 3
th(0)=-1.8517666459083557;dx=-4.760438712851646E-8
New Minimum: -1.8517666459083557 > -1.9459245949983597
WOLF (strong): th(1.9545031507969253E7)=-1.9459245949983597; dx=1.6084934653964757E-8 evalInputDelta=0.09415794909000397
New Minimum: -1.9459245949983597 > -1.9729213267564774
END: th(9772515.753984626)=-1.9729213267564774; dx=-7.295818100039004E-9 evalInputDelta=0.12115468084812164
Fitness changed from -1.8517666459083557 to -1.9729213267564774
Iteration 7 complete. Error: -1.9729213267564774 Total: 17.9985; Orientation: 0.9976; Line Search: 12.7614
Adding measurement 76aec3be to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.944e+03, gradient 1.739e-04, dot -0.363; [aa7d33bc-0c17-45c6-b5f5-34f0b3b50e0e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9729213267564774, -0.774563193321228, -0.4031839221715927, -0.40318332612514496
LBFGS Accumulation History: 3 points
Removed measurement 76aec3be to history. Total: 3
th(0)=-1.9729213267564774;dx=-3.0241454962953355E-8
New Minimum: -1.9729213267564774 > -2.0430671721696854
WOLF (strong): th(2.105424694926757E7)=-2.0430671721696854; dx=6.8570364384587714E-9 evalInputDelta=0.07014584541320801
New Minimum: -2.0430671721696854 > -2.0544618517160416
END: th(1.0527123474633785E7)=-2.0544618517160416; dx=-4.02263006152343E-9 evalInputDelta=0.08154052495956421
Fitness changed from -1.9729213267564774 to -2.0544618517160416
Iteration 8 complete. Error: -2.0544618517160416 Total: 18.3183; Orientation: 1.0290; Line Search: 12.5157
Adding measurement 6b5d2836 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.022e+03, gradient 1.637e-04, dot -0.360; [aa7d33bc-0c17-45c6-b5f5-34f0b3b50e0e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0544618517160416, -0.774563193321228, -0.4031839221715927, -0.40318332612514496
LBFGS Accumulation History: 3 points
Removed measurement 6b5d2836 to history. Total: 3
th(0)=-2.0544618517160416;dx=-2.6811925635857907E-8
New Minimum: -2.0544618517160416 > -2.0716816186904907
WOLF (strong): th(2.2680000000000007E7)=-2.0716816186904907; dx=1.0621551992278913E-8 evalInputDelta=0.017219766974449158
New Minimum: -2.0716816186904907 > -2.113052859902382
WOLF (strong): th(1.1340000000000004E7)=-2.113052859902382; dx=2.2801475588783788E-9 evalInputDelta=0.05859100818634033
END: th(3780000.0000000014)=-2.0936121493577957; dx=-1.4695230910389176E-8 evalInputDelta=0.03915029764175415
Fitness changed from -2.0544618517160416 to -2.113052859902382
Iteration 9 complete. Error: -2.113052859902382 Total: 22.5759; Orientation: 1.0325; Line Search: 17.4832
Adding measurement 77a8428c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.009e+03, gradient 1.727e-04, dot -0.305; [aa7d33bc-0c17-45c6-b5f5-34f0b3b50e0e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.113052859902382, -0.774563193321228, -0.4031839221715927, -0.40318332612514496
LBFGS Accumulation History: 3 points
Removed measurement 77a8428c to history. Total: 3
th(0)=-2.113052859902382;dx=-2.9818630367474006E-8
New Minimum: -2.113052859902382 > -2.168803319334984
END: th(8143763.128320524)=-2.168803319334984; dx=-3.0277281484520577E-10 evalInputDelta=0.05575045943260193
Fitness changed from -2.113052859902382 to -2.168803319334984
Iteration 10 complete. Error: -2.168803319334984 Total: 14.5485; Orientation: 1.0147; Line Search: 8.9453
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/da0dc141-acf8-4eaf-8eef-76b642d26455.jpg)
Final threshold in iteration 11: -2.168803319334984 (> -Infinity) after 208.268s (< 5400.000s)
Returns
-2.168803319334984