BasicOptimizer.scala:89 executed in 221.12 seconds (3.517 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: 688899436414000
Reset training subject: 688903809476100
Adding measurement 4a241ba3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-852.0855297445204;dx=-0.00980942625836264
New Minimum: -852.0855297445204 > -852.1070942082339
WOLFE (weak): th(2.154434690031884)=-852.1070942082339; dx=-0.00911436843844989 evalInputDelta=0.021564463713502846
New Minimum: -852.1070942082339 > -852.1286581262245
WOLFE (weak): th(4.308869380063768)=-852.1286581262245; dx=-0.009110495841660016 evalInputDelta=0.04312838170415034
New Minimum: -852.1286581262245 > -852.2149083417868
WOLFE (weak): th(12.926608140191302)=-852.2149083417868; dx=-0.009112672434812934 evalInputDelta=0.12937859726639545
New Minimum: -852.2149083417868 > -852.602926337929
WOLFE (weak): th(51.70643256076521)=-852.602926337929; dx=-0.009097224329424235 evalInputDelta=0.5173965934086482
New Minimum: -852.602926337929 > -854.6675157627087
WOLFE (weak): th(258.53216280382605)=-854.6675157627087; dx=-0.009072128241914083 evalInputDelta=2.5819860181883314
New Minimum: -854.6675157627087 > -867.4161342746629
WOLFE (weak): th(1551.1929768229563)=-867.4161342746629; dx=-0.008880051881385152 evalInputDelta=15.330604530142523
New Minimum: -867.4161342746629 > -949.4129765281282
END: th(10858.350837760694)=-949.4129765281282; dx=-0.00710099340833539 evalInputDelta=97.3274467836078
Fitness changed from -852.0855297445204 to -949.4129765281282
Iteration 1 complete. Error: -949.4129765281282 Total: 49.7179; Orientation: 0.0978; Line Search: 36.3985
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/cdadf666-d606-40f4-b207-964f14e4eeb7.jpg)
Adding measurement 51e5b596 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-949.4129765281282;dx=-0.006455687396376988
New Minimum: -949.4129765281282 > -1087.263997380581
END: th(23393.607721408407)=-1087.263997380581; dx=-0.004313638651241806 evalInputDelta=137.85102085245285
Fitness changed from -949.4129765281282 to -1087.263997380581
Iteration 2 complete. Error: -1087.263997380581 Total: 14.9334; Orientation: 0.0986; Line Search: 9.0770
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d54e49b2-5b9e-4a2c-b44a-a3dbeca6c044.jpg)
Adding measurement 1b978c39 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1087.263997380581;dx=-0.004186288018500691
New Minimum: -1087.263997380581 > -1262.128757298557
END: th(50400.00000000001)=-1262.128757298557; dx=-0.0023206969752988544 evalInputDelta=174.86475991797602
Fitness changed from -1087.263997380581 to -1262.128757298557
Iteration 3 complete. Error: -1262.128757298557 Total: 14.7282; Orientation: 0.0988; Line Search: 9.1272
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/18f871f9-3337-4d75-9e85-db323bb6aa58.jpg)
Adding measurement 2d8dd2ac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.374e+03, gradient 5.808e-02, dot -0.733; [bc76cc60-3ca8-45cb-8300-6d7189eec7b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1262.128757298557, -1087.263997380581, -949.4129765281282, -852.0855297445204
LBFGS Accumulation History: 3 points
Removed measurement 2d8dd2ac to history. Total: 3
th(0)=-1262.128757298557;dx=-0.0033692431701005006
New Minimum: -1262.128757298557 > -1438.0897485901219
END: th(108583.50837760697)=-1438.0897485901219; dx=-7.530398981538295E-4 evalInputDelta=175.96099129156482
Fitness changed from -1262.128757298557 to -1438.0897485901219
Iteration 4 complete. Error: -1438.0897485901219 Total: 15.9989; Orientation: 1.7100; Line Search: 8.8956
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/9ed9b117-0638-4b97-b112-4a15e7ecaebd.jpg)
Adding measurement 36879abd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.300e+03, gradient 6.690e-02, dot -0.459; [bc76cc60-3ca8-45cb-8300-6d7189eec7b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1438.0897485901219, -1087.263997380581, -949.4129765281282, -852.0855297445204
LBFGS Accumulation History: 3 points
Removed measurement 36879abd to history. Total: 3
th(0)=-1438.0897485901219;dx=-0.004466977363012336
New Minimum: -1438.0897485901219 > -1495.0737440006094
WOLF (strong): th(233936.07721408413)=-1495.0737440006094; dx=3.115340438387627E-4 evalInputDelta=56.98399541048752
New Minimum: -1495.0737440006094 > -1547.7997286470882
WOLF (strong): th(116968.03860704206)=-1547.7997286470882; dx=2.881606044517414E-4 evalInputDelta=109.70998005696629
New Minimum: -1547.7997286470882 > -1548.3933608744258
END: th(38989.346202347355)=-1548.3933608744258; dx=-0.0010203343557094336 evalInputDelta=110.30361228430388
Fitness changed from -1438.0897485901219 to -1548.3933608744258
Iteration 5 complete. Error: -1548.3933608744258 Total: 25.4801; Orientation: 1.6907; Line Search: 18.2460
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/fbf6de15-40a9-4df1-a7ee-14c24c77a3e6.jpg)
Adding measurement 19b65795 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.158e+04, gradient 5.388e-02, dot -0.552; [bc76cc60-3ca8-45cb-8300-6d7189eec7b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1548.3933608744258, -1087.263997380581, -949.4129765281282, -852.0855297445204
LBFGS Accumulation History: 3 points
Removed measurement 19b65795 to history. Total: 3
th(0)=-1548.3933608744258;dx=-0.0029001659111359693
New Minimum: -1548.3933608744258 > -1653.074937805301
END: th(84000.00000000003)=-1653.074937805301; dx=-3.604310984154719E-4 evalInputDelta=104.68157693087528
Fitness changed from -1548.3933608744258 to -1653.074937805301
Iteration 6 complete. Error: -1653.074937805301 Total: 16.2111; Orientation: 1.6332; Line Search: 8.9505
Adding measurement 3966c38b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.573e+04, gradient 6.469e-02, dot -0.452; [bc76cc60-3ca8-45cb-8300-6d7189eec7b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1653.074937805301, -1087.263997380581, -949.4129765281282, -852.0855297445204
LBFGS Accumulation History: 3 points
Removed measurement 3966c38b to history. Total: 3
th(0)=-1653.074937805301;dx=-0.004177072108006625
New Minimum: -1653.074937805301 > -1676.0363957862014
WOLF (strong): th(180972.5139626783)=-1676.0363957862014; dx=4.0738602174981953E-4 evalInputDelta=22.961457980900377
New Minimum: -1676.0363957862014 > -1730.4827361172952
WOLF (strong): th(90486.25698133915)=-1730.4827361172952; dx=4.47681906377235E-4 evalInputDelta=77.40779831199416
New Minimum: -1730.4827361172952 > -1737.2688335430414
END: th(30162.08566044638)=-1737.2688335430414; dx=-0.0011044346079329946 evalInputDelta=84.19389573774038
Fitness changed from -1653.074937805301 to -1737.2688335430414
Iteration 7 complete. Error: -1737.2688335430414 Total: 24.3963; Orientation: 1.6094; Line Search: 18.0624
Adding measurement 4559df6a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.892e+04, gradient 4.668e-02, dot -0.612; [bc76cc60-3ca8-45cb-8300-6d7189eec7b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1737.2688335430414, -1087.263997380581, -949.4129765281282, -852.0855297445204
LBFGS Accumulation History: 3 points
Removed measurement 4559df6a to history. Total: 3
th(0)=-1737.2688335430414;dx=-0.0021674976004574234
New Minimum: -1737.2688335430414 > -1821.1630898961246
END: th(64982.24367057892)=-1821.1630898961246; dx=-7.07224703353595E-4 evalInputDelta=83.89425635308316
Fitness changed from -1737.2688335430414 to -1821.1630898961246
Iteration 8 complete. Error: -1821.1630898961246 Total: 15.3596; Orientation: 1.6482; Line Search: 9.1524
Adding measurement 5f4935b8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.254e+04, gradient 5.380e-02, dot -0.525; [bc76cc60-3ca8-45cb-8300-6d7189eec7b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1821.1630898961246, -1087.263997380581, -949.4129765281282, -852.0855297445204
LBFGS Accumulation History: 3 points
Removed measurement 5f4935b8 to history. Total: 3
th(0)=-1821.1630898961246;dx=-0.0028855170214348454
New Minimum: -1821.1630898961246 > -1874.7166452560236
WOLF (strong): th(140000.00000000006)=-1874.7166452560236; dx=1.5512893023916606E-4 evalInputDelta=53.553555359899065
New Minimum: -1874.7166452560236 > -1887.7733576888938
END: th(70000.00000000003)=-1887.7733576888938; dx=-6.712284794539632E-5 evalInputDelta=66.61026779276926
Fitness changed from -1821.1630898961246 to -1887.7733576888938
Iteration 9 complete. Error: -1887.7733576888938 Total: 19.2378; Orientation: 1.6108; Line Search: 13.3178
Adding measurement 6b90d2f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.357e+04, gradient 5.783e-02, dot -0.458; [bc76cc60-3ca8-45cb-8300-6d7189eec7b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1887.7733576888938, -1087.263997380581, -949.4129765281282, -852.0855297445204
LBFGS Accumulation History: 3 points
Removed measurement 6b90d2f to history. Total: 3
th(0)=-1887.7733576888938;dx=-0.0033371833992268157
New Minimum: -1887.7733576888938 > -1912.8647364620426
WOLF (strong): th(150810.42830223194)=-1912.8647364620426; dx=5.528347765475201E-4 evalInputDelta=25.09137877314879
New Minimum: -1912.8647364620426 > -1966.5258071024646
WOLF (strong): th(75405.21415111597)=-1966.5258071024646; dx=3.496154771240677E-4 evalInputDelta=78.75244941357073
END: th(25135.071383705323)=-1952.4420606000067; dx=-0.001454104306697352 evalInputDelta=64.66870291111286
Fitness changed from -1887.7733576888938 to -1966.5258071024646
Iteration 10 complete. Error: -1966.5258071024646 Total: 24.0847; Orientation: 1.5990; Line Search: 17.9538
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/d253e441-aab8-43af-b2d2-f736f396b3eb.jpg)
Final threshold in iteration 11: -1966.5258071024646 (> -Infinity) after 221.124s (< 5400.000s)
Returns
-1966.5258071024646