BasicOptimizer.scala:89 executed in 307.71 seconds (4.342 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: 658545804853400
Reset training subject: 658552141587900
Adding measurement 4644d824 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-31.952684466102635;dx=-2.089870057650714E-6
New Minimum: -31.952684466102635 > -31.952688011684828
END: th(2.154434690031884)=-31.952688011684828; dx=-1.8750721269486934E-6 evalInputDelta=3.545582192288066E-6
Fitness changed from -31.952684466102635 to -31.952688011684828
Iteration 1 complete. Error: -31.952688011684828 Total: 30.9113; Orientation: 0.1467; Line Search: 12.2421
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/637f1045-f2d2-4a31-88b9-cc9ffc457aa8.jpg)
Adding measurement 5260cef9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-31.952688011684828;dx=-1.8732156369657051E-6
New Minimum: -31.952688011684828 > -31.95269864842904
WOLFE (weak): th(4.641588833612779)=-31.95269864842904; dx=-1.8719579236790673E-6 evalInputDelta=1.0636744210756888E-5
New Minimum: -31.95269864842904 > -31.952709285169707
WOLFE (weak): th(9.283177667225559)=-31.952709285169707; dx=-1.872436267779722E-6 evalInputDelta=2.1273484879458238E-5
New Minimum: -31.952709285169707 > -31.952747104663406
WOLFE (weak): th(27.849533001676676)=-31.952747104663406; dx=-1.8706093976350236E-6 evalInputDelta=5.909297857797924E-5
New Minimum: -31.952747104663406 > -31.952922019239505
WOLFE (weak): th(111.3981320067067)=-31.952922019239505; dx=-1.8713974588679427E-6 evalInputDelta=2.340075546776177E-4
New Minimum: -31.952922019239505 > -31.953852123233656
WOLFE (weak): th(556.9906600335335)=-31.953852123233656; dx=-1.8715256863564082E-6 evalInputDelta=0.0011641115488281173
New Minimum: -31.953852123233656 > -31.959670863344602
WOLFE (weak): th(3341.9439602012008)=-31.959670863344602; dx=-1.8705568480008658E-6 evalInputDelta=0.006982851659774525
New Minimum: -31.959670863344602 > -32.001522995336806
WOLFE (weak): th(23393.607721408407)=-32.001522995336806; dx=-1.8680823890844989E-6 evalInputDelta=0.0488349836519788
New Minimum: -32.001522995336806 > -32.34104166318788
WOLFE (weak): th(187148.86177126726)=-32.34104166318788; dx=-1.8450990800080514E-6 evalInputDelta=0.3883536515030528
New Minimum: -32.34104166318788 > -35.21151633588578
END: th(1684339.7559414054)=-35.21151633588578; dx=-1.5784168165514485E-6 evalInputDelta=3.2588283242009553
Fitness changed from -31.952688011684828 to -35.21151633588578
Iteration 2 complete. Error: -35.21151633588578 Total: 68.1628; Orientation: 0.1456; Line Search: 60.9430
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/f5c22c29-3ba0-4fb3-af0e-e4fed8d2e8a2.jpg)
Adding measurement 77bf25ec to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-35.21151633588578;dx=-1.4762994516281084E-6
New Minimum: -35.21151633588578 > -40.08160052181439
END: th(3628800.0000000005)=-40.08160052181439; dx=-9.44716427087541E-7 evalInputDelta=4.870084185928604
Fitness changed from -35.21151633588578 to -40.08160052181439
Iteration 3 complete. Error: -40.08160052181439 Total: 19.2853; Orientation: 0.1419; Line Search: 12.2709
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/df84fdd2-1baf-4a44-91ee-cd1e0a6df860.jpg)
Adding measurement aaedf01 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.751e+03, gradient 9.505e-04, dot -0.780; [068d9a7c-65f8-4d7f-a99a-fa5a4b2dcdac = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.08160052181439, -35.21151633588578, -31.952688011684828, -31.952684466102635
LBFGS Accumulation History: 3 points
Removed measurement aaedf01 to history. Total: 3
th(0)=-40.08160052181439;dx=-9.023480801309342E-7
New Minimum: -40.08160052181439 > -45.97273796930151
END: th(7818012.603187701)=-45.97273796930151; dx=-4.713064303687407E-7 evalInputDelta=5.891137447487125
Fitness changed from -40.08160052181439 to -45.97273796930151
Iteration 4 complete. Error: -45.97273796930151 Total: 22.5451; Orientation: 2.6354; Line Search: 12.6232
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/1091fde6-8a53-4877-8f45-595dd601a4ff.jpg)
Adding measurement 19b32076 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.351e+03, gradient 8.411e-04, dot -0.558; [068d9a7c-65f8-4d7f-a99a-fa5a4b2dcdac = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.97273796930151, -35.21151633588578, -31.952688011684828, -31.952684466102635
LBFGS Accumulation History: 3 points
Removed measurement 19b32076 to history. Total: 3
th(0)=-45.97273796930151;dx=-7.06449325258607E-7
New Minimum: -45.97273796930151 > -51.973311937954485
END: th(1.6843397559414055E7)=-51.973311937954485; dx=-1.2503323983178503E-7 evalInputDelta=6.000573968652972
Fitness changed from -45.97273796930151 to -51.973311937954485
Iteration 5 complete. Error: -51.973311937954485 Total: 22.8970; Orientation: 2.8044; Line Search: 12.6976
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b71dcd22-43f4-4e63-8f74-cdfe6a292f8e.jpg)
Adding measurement 722e4207 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.204e+04, gradient 1.048e-03, dot -0.325; [068d9a7c-65f8-4d7f-a99a-fa5a4b2dcdac = 1.000/1.000e+00]
Orientation rejected. Popping history element from -51.973311937954485, -35.21151633588578, -31.952688011684828, -31.952684466102635
LBFGS Accumulation History: 3 points
Removed measurement 722e4207 to history. Total: 3
th(0)=-51.973311937954485;dx=-1.0986331030461456E-6
Armijo: th(3.628800000000001E7)=-48.54615538789826; dx=2.2978411857434109E-7 evalInputDelta=-3.4271565500562247
New Minimum: -51.973311937954485 > -54.85146851773735
WOLF (strong): th(1.8144000000000004E7)=-54.85146851773735; dx=3.284361047515293E-7 evalInputDelta=2.8781565797828677
New Minimum: -54.85146851773735 > -56.92962991183249
END: th(6048000.000000001)=-56.92962991183249; dx=-3.302595161162157E-7 evalInputDelta=4.956317973878008
Fitness changed from -51.973311937954485 to -56.92962991183249
Iteration 6 complete. Error: -56.92962991183249 Total: 33.8508; Orientation: 2.5116; Line Search: 24.2146
Adding measurement 669cc907 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.163e+04, gradient 7.366e-04, dot -0.605; [068d9a7c-65f8-4d7f-a99a-fa5a4b2dcdac = 1.000/1.000e+00]
Orientation rejected. Popping history element from -56.92962991183249, -35.21151633588578, -31.952688011684828, -31.952684466102635
LBFGS Accumulation History: 3 points
Removed measurement 669cc907 to history. Total: 3
th(0)=-56.92962991183249;dx=-5.422189932136444E-7
New Minimum: -56.92962991183249 > -61.342608657013734
END: th(1.3030021005312836E7)=-61.342608657013734; dx=-1.4120707671620269E-7 evalInputDelta=4.412978745181242
Fitness changed from -56.92962991183249 to -61.342608657013734
Iteration 7 complete. Error: -61.342608657013734 Total: 21.1008; Orientation: 2.5573; Line Search: 12.2721
Adding measurement 546178c9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.841e+04, gradient 8.751e-04, dot -0.469; [068d9a7c-65f8-4d7f-a99a-fa5a4b2dcdac = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.342608657013734, -35.21151633588578, -31.952688011684828, -31.952684466102635
LBFGS Accumulation History: 3 points
Removed measurement 546178c9 to history. Total: 3
th(0)=-61.342608657013734;dx=-7.650122259425612E-7
Armijo: th(2.8072329265690096E7)=-61.10915540872281; dx=1.986466418281496E-7 evalInputDelta=-0.23345324829092107
New Minimum: -61.342608657013734 > -64.44036561404064
WOLF (strong): th(1.4036164632845048E7)=-64.44036561404064; dx=1.5026394292927487E-7 evalInputDelta=3.0977569570269097
END: th(4678721.544281683)=-64.26968148481811; dx=-3.462076659732739E-7 evalInputDelta=2.9270728278043734
Fitness changed from -61.342608657013734 to -64.44036561404064
Iteration 8 complete. Error: -64.44036561404064 Total: 32.7507; Orientation: 2.4981; Line Search: 24.3808
Adding measurement baf3dfb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.918e+04, gradient 1.021e-03, dot -0.337; [068d9a7c-65f8-4d7f-a99a-fa5a4b2dcdac = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.44036561404064, -35.21151633588578, -31.952688011684828, -31.952684466102635
LBFGS Accumulation History: 3 points
Removed measurement baf3dfb to history. Total: 3
th(0)=-64.44036561404064;dx=-1.0420433942622266E-6
New Minimum: -64.44036561404064 > -70.01137879484861
WOLF (strong): th(1.0080000000000004E7)=-70.01137879484861; dx=9.924360640193157E-8 evalInputDelta=5.571013180807967
END: th(5040000.000000002)=-68.96688769680914; dx=-5.236373067636604E-7 evalInputDelta=4.526522082768494
Fitness changed from -64.44036561404064 to -70.01137879484861
Iteration 9 complete. Error: -70.01137879484861 Total: 26.6521; Orientation: 2.5879; Line Search: 18.0915
Adding measurement 545c306c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.456e+04, gradient 7.918e-04, dot -0.496; [068d9a7c-65f8-4d7f-a99a-fa5a4b2dcdac = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.01137879484861, -35.21151633588578, -31.952688011684828, -31.952684466102635
LBFGS Accumulation History: 3 points
Removed measurement 545c306c to history. Total: 3
th(0)=-70.01137879484861;dx=-6.266993504808129E-7
New Minimum: -70.01137879484861 > -73.44098702145791
WOLF (strong): th(1.0858350837760698E7)=-73.44098702145791; dx=9.331541504651258E-9 evalInputDelta=3.4296082266093038
END: th(5429175.418880349)=-72.75273996221955; dx=-2.816496355703943E-7 evalInputDelta=2.7413611673709397
Fitness changed from -70.01137879484861 to -73.44098702145791
Iteration 10 complete. Error: -73.44098702145791 Total: 28.5226; Orientation: 2.7087; Line Search: 19.5075
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/24a813d1-a831-4284-a636-422f50c5058e.jpg)
Final threshold in iteration 11: -73.44098702145791 (> -Infinity) after 307.710s (< 5400.000s)
Returns
-73.44098702145791