BasicOptimizer.scala:89 executed in 44.15 seconds (0.801 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: 213530277399800
Reset training subject: 213531129307400
Adding measurement 731898c7 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2.2000657965760904;dx=-2.2729863966088083E-5
New Minimum: -2.2000657965760904 > -2.2000951987073583
WOLFE (weak): th(2.154434690031884)=-2.2000951987073583; dx=-2.2734829276399306E-5 evalInputDelta=2.9402131267897147E-5
New Minimum: -2.2000951987073583 > -2.2001247985357897
WOLFE (weak): th(4.308869380063768)=-2.2001247985357897; dx=-2.2737041488878328E-5 evalInputDelta=5.900195969932298E-5
New Minimum: -2.2001247985357897 > -2.2002431172690855
WOLFE (weak): th(12.926608140191302)=-2.2002431172690855; dx=-2.2735098813039902E-5 evalInputDelta=1.7732069299514208E-4
New Minimum: -2.2002431172690855 > -2.2007736445265813
WOLFE (weak): th(51.70643256076521)=-2.2007736445265813; dx=-2.272155489063725E-5 evalInputDelta=7.078479504909474E-4
New Minimum: -2.2007736445265813 > -2.2035817968405977
WOLFE (weak): th(258.53216280382605)=-2.2035817968405977; dx=-2.262223131011503E-5 evalInputDelta=0.0035160002645073796
New Minimum: -2.2035817968405977 > -2.220674369591655
WOLFE (weak): th(1551.1929768229563)=-2.220674369591655; dx=-2.207771932247321E-5 evalInputDelta=0.020608573015564513
New Minimum: -2.220674369591655 > -2.320515933014858
END: th(10858.350837760694)=-2.320515933014858; dx=-1.7710888041819122E-5 evalInputDelta=0.12045013643876779
Fitness changed from -2.2000657965760904 to -2.320515933014858
Iteration 1 complete. Error: -2.320515933014858 Total: 6.8982; Orientation: 0.0160; Line Search: 4.8667
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e8126694-d517-47b9-9d67-63efd379c4ad.jpg)
Adding measurement 2a5d4308 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-2.320515933014858;dx=-2.0050928587708872E-5
New Minimum: -2.320515933014858 > -2.4959995319391597
END: th(23393.607721408407)=-2.4959995319391597; dx=-1.410462065359209E-5 evalInputDelta=0.17548359892430154
Fitness changed from -2.320515933014858 to -2.4959995319391597
Iteration 2 complete. Error: -2.4959995319391597 Total: 1.8653; Orientation: 0.0165; Line Search: 1.2462
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6f77af08-a40e-4b1c-adb4-1873d44d78e7.jpg)
Adding measurement 46cc76de to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-2.4959995319391597;dx=-2.1980386371992265E-5
New Minimum: -2.4959995319391597 > -2.7047362459836015
END: th(50400.00000000001)=-2.7047362459836015; dx=-9.83371696650909E-6 evalInputDelta=0.20873671404444183
Fitness changed from -2.4959995319391597 to -2.7047362459836015
Iteration 3 complete. Error: -2.7047362459836015 Total: 1.7895; Orientation: 0.0163; Line Search: 1.1925
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/1a2f43db-c18b-4b50-9a77-d2f404035aa3.jpg)
Adding measurement 1e78acde to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.168e+03, gradient 5.662e-03, dot -0.465; [36417458-8149-4fd0-8e58-b9ed256adfa6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.7047362459836015, -2.4959995319391597, -2.320515933014858, -2.2000657965760904
LBFGS Accumulation History: 3 points
Removed measurement 1e78acde to history. Total: 3
th(0)=-2.7047362459836015;dx=-3.204340886697785E-5
Armijo: th(108583.50837760697)=-2.0545031579932216; dx=-2.4137213980486106E-6 evalInputDelta=-0.6502330879903799
New Minimum: -2.7047362459836015 > -2.7677233029858663
END: th(54291.75418880348)=-2.7677233029858663; dx=-6.819403920674471E-6 evalInputDelta=0.06298705700226481
Fitness changed from -2.7047362459836015 to -2.7677233029858663
Iteration 4 complete. Error: -2.7677233029858663 Total: 2.9233; Orientation: 0.3091; Line Search: 2.0405
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/38f79ef4-8491-40c9-ad32-682abe50f71c.jpg)
Adding measurement 75cc357c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.669e+03, gradient 5.942e-03, dot -0.339; [36417458-8149-4fd0-8e58-b9ed256adfa6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.7677233029858663, -2.4959995319391597, -2.320515933014858, -2.2000657965760904
LBFGS Accumulation History: 3 points
Removed measurement 75cc357c to history. Total: 3
th(0)=-2.7677233029858663;dx=-3.530345866893805E-5
Armijo: th(116968.03860704206)=-2.1235418688368695; dx=-2.5178754572246898E-6 evalInputDelta=-0.6441814341489969
New Minimum: -2.7677233029858663 > -2.9564046874436256
END: th(58484.01930352103)=-2.9564046874436256; dx=-9.199150891567342E-6 evalInputDelta=0.18868138445775928
Fitness changed from -2.7677233029858663 to -2.9564046874436256
Iteration 5 complete. Error: -2.9564046874436256 Total: 2.8277; Orientation: 0.3040; Line Search: 1.9117
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/66bfc726-9ef8-4118-be76-de918e4d43f8.jpg)
Adding measurement 2a880ebe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.403e+03, gradient 5.558e-03, dot -0.322; [36417458-8149-4fd0-8e58-b9ed256adfa6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.9564046874436256, -2.4959995319391597, -2.320515933014858, -2.2000657965760904
LBFGS Accumulation History: 3 points
Removed measurement 2a880ebe to history. Total: 3
th(0)=-2.9564046874436256;dx=-3.087234118916481E-5
Armijo: th(126000.00000000004)=-2.115409074557725; dx=-2.531337511443925E-6 evalInputDelta=-0.8409956128859006
New Minimum: -2.9564046874436256 > -3.0957535391732263
END: th(63000.00000000002)=-3.0957535391732263; dx=-9.794617122715974E-6 evalInputDelta=0.13934885172960065
Fitness changed from -2.9564046874436256 to -3.0957535391732263
Iteration 6 complete. Error: -3.0957535391732263 Total: 2.8055; Orientation: 0.3416; Line Search: 1.8194
Adding measurement 5c04bfe4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.281e+03, gradient 5.504e-03, dot -0.280; [36417458-8149-4fd0-8e58-b9ed256adfa6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.0957535391732263, -2.4959995319391597, -2.320515933014858, -2.2000657965760904
LBFGS Accumulation History: 3 points
Removed measurement 5c04bfe4 to history. Total: 3
th(0)=-3.0957535391732263;dx=-3.0260901450075086E-5
Armijo: th(135729.38547200873)=-2.070123612528037; dx=-2.3439566356345E-6 evalInputDelta=-1.0256299266451894
New Minimum: -3.0957535391732263 > -3.104867270918782
END: th(67864.69273600436)=-3.104867270918782; dx=-9.05606595649897E-6 evalInputDelta=0.009113731745555853
Fitness changed from -3.0957535391732263 to -3.104867270918782
Iteration 7 complete. Error: -3.104867270918782 Total: 2.7305; Orientation: 0.3133; Line Search: 1.8401
Adding measurement 21a15995 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.977e+03, gradient 5.126e-03, dot -0.257; [36417458-8149-4fd0-8e58-b9ed256adfa6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.104867270918782, -2.4959995319391597, -2.320515933014858, -2.2000657965760904
LBFGS Accumulation History: 3 points
Removed measurement 21a15995 to history. Total: 3
th(0)=-3.104867270918782;dx=-2.6245475031036273E-5
Armijo: th(146210.0482588026)=-2.0957893757418544; dx=-2.4356594729290395E-6 evalInputDelta=-1.0090778951769277
New Minimum: -3.104867270918782 > -3.1908081336497345
END: th(73105.0241294013)=-3.1908081336497345; dx=-9.202306584401876E-6 evalInputDelta=0.08594086273095236
Fitness changed from -3.104867270918782 to -3.1908081336497345
Iteration 8 complete. Error: -3.1908081336497345 Total: 2.9257; Orientation: 0.3048; Line Search: 2.0846
Adding measurement 3338a117 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.145e+03, gradient 4.937e-03, dot -0.246; [36417458-8149-4fd0-8e58-b9ed256adfa6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.1908081336497345, -2.4959995319391597, -2.320515933014858, -2.2000657965760904
LBFGS Accumulation History: 3 points
Removed measurement 3338a117 to history. Total: 3
th(0)=-3.1908081336497345;dx=-2.4355085938841743E-5
Armijo: th(157500.00000000006)=-1.9290985417340183; dx=-2.767721998784271E-6 evalInputDelta=-1.2617095919157162
Armijo: th(78750.00000000003)=-3.117823660310272; dx=-8.103144124793592E-6 evalInputDelta=-0.07298447333946267
New Minimum: -3.1908081336497345 > -3.3533957283135
END: th(26250.00000000001)=-3.3533957283135; dx=-1.7259452825992674E-5 evalInputDelta=0.1625875946637656
Fitness changed from -3.1908081336497345 to -3.3533957283135
Iteration 9 complete. Error: -3.3533957283135 Total: 3.3452; Orientation: 0.2929; Line Search: 2.5100
Adding measurement 79556cb1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.801e+03, gradient 4.264e-03, dot -0.290; [36417458-8149-4fd0-8e58-b9ed256adfa6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.3533957283135, -2.4959995319391597, -2.320515933014858, -2.2000657965760904
LBFGS Accumulation History: 3 points
Removed measurement 79556cb1 to history. Total: 3
th(0)=-3.3533957283135;dx=-1.816044998319959E-5
New Minimum: -3.3533957283135 > -3.407271298170267
END: th(56553.91061333697)=-3.407271298170267; dx=-1.1776967272893911E-5 evalInputDelta=0.05387556985676678
Fitness changed from -3.3533957283135 to -3.407271298170267
Iteration 10 complete. Error: -3.407271298170267 Total: 2.1375; Orientation: 0.3090; Line Search: 1.2774
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/4465eced-ed1f-4de5-9ca8-202125ff5aed.jpg)
Adding measurement 213a4e3f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.257e+03, gradient 4.184e-03, dot -0.289; [36417458-8149-4fd0-8e58-b9ed256adfa6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.407271298170267, -2.4959995319391597, -2.320515933014858, -2.2000657965760904
LBFGS Accumulation History: 3 points
Removed measurement 213a4e3f to history. Total: 3
th(0)=-3.407271298170267;dx=-1.7479862237302936E-5
Armijo: th(121841.70688233551)=-2.9527145505155232; dx=-6.95770298788097E-6 evalInputDelta=-0.45455674765474363
New Minimum: -3.407271298170267 > -3.4142254247895574
END: th(60920.853441167754)=-3.4142254247895574; dx=-1.0925941011649314E-5 evalInputDelta=0.006954126619290513
Fitness changed from -3.407271298170267 to -3.4142254247895574
Iteration 11 complete. Error: -3.4142254247895574 Total: 2.7736; Orientation: 0.3207; Line Search: 1.8536
Adding measurement 56777270 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.592e+03, gradient 4.233e-03, dot -0.298; [36417458-8149-4fd0-8e58-b9ed256adfa6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.4142254247895574, -2.4959995319391597, -2.320515933014858, -2.2000657965760904
LBFGS Accumulation History: 3 points
Removed measurement 56777270 to history. Total: 3
th(0)=-3.4142254247895574;dx=-1.790215974261162E-5
Armijo: th(131250.00000000006)=-2.8556515224864123; dx=-5.308797729737792E-6 evalInputDelta=-0.5585739023031451
Armijo: th(65625.00000000003)=-3.412449284829857; dx=-9.511190063842204E-6 evalInputDelta=-0.0017761399597002736
New Minimum: -3.4142254247895574 > -3.491675242213125
END: th(21875.00000000001)=-3.491675242213125; dx=-1.4765029506575313E-5 evalInputDelta=0.0774498174235676
Fitness changed from -3.4142254247895574 to -3.491675242213125
Iteration 12 complete. Error: -3.491675242213125 Total: 3.5412; Orientation: 0.3041; Line Search: 2.6751
Adding measurement 2bc63e21 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.171e+03, gradient 3.939e-03, dot -0.318; [36417458-8149-4fd0-8e58-b9ed256adfa6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.491675242213125, -2.4959995319391597, -2.320515933014858, -2.2000657965760904
LBFGS Accumulation History: 3 points
Removed measurement 2bc63e21 to history. Total: 3
th(0)=-3.491675242213125;dx=-1.5491643532267335E-5
New Minimum: -3.491675242213125 > -3.5248097771480387
END: th(47128.25884444748)=-3.5248097771480387; dx=-1.202464011992698E-5 evalInputDelta=0.033134534934913695
Fitness changed from -3.491675242213125 to -3.5248097771480387
Iteration 13 complete. Error: -3.5248097771480387 Total: 2.1160; Orientation: 0.2960; Line Search: 1.2776
Adding measurement 21a754d4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.598e+03, gradient 3.922e-03, dot -0.311; [36417458-8149-4fd0-8e58-b9ed256adfa6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.5248097771480387, -2.4959995319391597, -2.320515933014858, -2.2000657965760904
LBFGS Accumulation History: 3 points
Removed measurement 21a754d4 to history. Total: 3
th(0)=-3.5248097771480387;dx=-1.5357759385054078E-5
Armijo: th(101534.7557352796)=-3.352759593829978; dx=-7.893684476298818E-6 evalInputDelta=-0.17205018331806077
New Minimum: -3.5248097771480387 > -3.567736455040018
END: th(50767.3778676398)=-3.567736455040018; dx=-1.055127511701954E-5 evalInputDelta=0.04292667789197946
Fitness changed from -3.5248097771480387 to -3.567736455040018
Iteration 14 complete. Error: -3.567736455040018 Total: 2.7273; Orientation: 0.3017; Line Search: 1.8616
Adding measurement f7be90d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.865e+03, gradient 3.833e-03, dot -0.312; [36417458-8149-4fd0-8e58-b9ed256adfa6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.567736455040018, -2.4959995319391597, -2.320515933014858, -2.2000657965760904
LBFGS Accumulation History: 3 points
Removed measurement f7be90d to history. Total: 3
th(0)=-3.567736455040018;dx=-1.4675037219606157E-5
Armijo: th(109375.00000000007)=-3.333751073060224; dx=-7.004958216795259E-6 evalInputDelta=-0.23398538197979413
New Minimum: -3.567736455040018 > -3.5993626640545973
END: th(54687.50000000004)=-3.5993626640545973; dx=-1.0026655588069283E-5 evalInputDelta=0.03162620901457913
Fitness changed from -3.567736455040018 to -3.5993626640545973
Iteration 15 complete. Error: -3.5993626640545973 Total: 2.7184; Orientation: 0.3054; Line Search: 1.8464
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/3db2cb21-4fab-48a5-be79-a87c657eb30b.jpg)
Final threshold in iteration 16: -3.5993626640545973 (> -Infinity) after 44.147s (< 5400.000s)
Returns
-3.5993626640545973