BasicOptimizer.scala:89 executed in 217.56 seconds (3.260 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: 683156750645300
Reset training subject: 683161486148700
Adding measurement 635eeded to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2232.228258937692;dx=-0.007691440423315089
New Minimum: -2232.228258937692 > -2232.2465141645985
WOLFE (weak): th(2.154434690031884)=-2232.2465141645985; dx=-0.0076690741145575905 evalInputDelta=0.01825522690660364
New Minimum: -2232.2465141645985 > -2232.2649932299705
WOLFE (weak): th(4.308869380063768)=-2232.2649932299705; dx=-0.0076745820819430505 evalInputDelta=0.03673429227865199
New Minimum: -2232.2649932299705 > -2232.3384600010813
WOLFE (weak): th(12.926608140191302)=-2232.3384600010813; dx=-0.007666078615968731 evalInputDelta=0.11020106338946789
New Minimum: -2232.3384600010813 > -2232.6690305551338
WOLFE (weak): th(51.70643256076521)=-2232.6690305551338; dx=-0.00766934621515228 evalInputDelta=0.4407716174418965
New Minimum: -2232.6690305551338 > -2234.428562295067
WOLFE (weak): th(258.53216280382605)=-2234.428562295067; dx=-0.007641626986191209 evalInputDelta=2.2003033573751054
New Minimum: -2234.428562295067 > -2245.305324449216
WOLFE (weak): th(1551.1929768229563)=-2245.305324449216; dx=-0.007498909867480641 evalInputDelta=13.077065511524324
New Minimum: -2245.305324449216 > -2316.674124688235
END: th(10858.350837760694)=-2316.674124688235; dx=-0.006310583397320795 evalInputDelta=84.44586575054336
Fitness changed from -2232.228258937692 to -2316.674124688235
Iteration 1 complete. Error: -2316.674124688235 Total: 50.4921; Orientation: 0.0985; Line Search: 36.5535
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5cbe33c1-1a43-458a-b121-4d636f3d859c.jpg)
Adding measurement 1448c5f2 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-2316.674124688235;dx=-0.005666993199774307
New Minimum: -2316.674124688235 > -2442.5127430578536
END: th(23393.607721408407)=-2442.5127430578536; dx=-0.004100086367034355 evalInputDelta=125.83861836961842
Fitness changed from -2316.674124688235 to -2442.5127430578536
Iteration 2 complete. Error: -2442.5127430578536 Total: 14.3266; Orientation: 0.0844; Line Search: 9.0097
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/036c18df-d9b9-4d83-82c5-14ad3b430446.jpg)
Adding measurement 773a84a2 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-2442.5127430578536;dx=-0.003747426548539577
New Minimum: -2442.5127430578536 > -2608.6549216023186
END: th(50400.00000000001)=-2608.6549216023186; dx=-0.0024086916265604434 evalInputDelta=166.14217854446497
Fitness changed from -2442.5127430578536 to -2608.6549216023186
Iteration 3 complete. Error: -2608.6549216023186 Total: 14.4769; Orientation: 0.0860; Line Search: 9.2211
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/8dfa6e8c-6a41-4e9f-b485-df427a8fbfab.jpg)
Adding measurement 1e1b0fd6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.734e+03, gradient 5.116e-02, dot -0.850; [af6f747f-aa46-4ed0-af18-aeee7ce3d088 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2608.6549216023186, -2442.5127430578536, -2316.674124688235, -2232.228258937692
LBFGS Accumulation History: 3 points
Removed measurement 1e1b0fd6 to history. Total: 3
th(0)=-2608.6549216023186;dx=-0.0026063638601324
New Minimum: -2608.6549216023186 > -2821.5770413015484
END: th(108583.50837760697)=-2821.5770413015484; dx=-0.0013499775557867795 evalInputDelta=212.92211969922982
Fitness changed from -2608.6549216023186 to -2821.5770413015484
Iteration 4 complete. Error: -2821.5770413015484 Total: 16.4774; Orientation: 1.7206; Line Search: 9.2587
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/cf62ddeb-824c-4aba-bb29-c91b8f069658.jpg)
Adding measurement 2ed13287 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.332e+04, gradient 5.322e-02, dot -0.657; [af6f747f-aa46-4ed0-af18-aeee7ce3d088 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2821.5770413015484, -2442.5127430578536, -2316.674124688235, -2232.228258937692
LBFGS Accumulation History: 3 points
Removed measurement 2ed13287 to history. Total: 3
th(0)=-2821.5770413015484;dx=-0.002830839234162949
New Minimum: -2821.5770413015484 > -2937.5666800942577
WOLF (strong): th(233936.07721408413)=-2937.5666800942577; dx=1.4711218124421606E-4 evalInputDelta=115.98963879270923
New Minimum: -2937.5666800942577 > -2951.269218488886
END: th(116968.03860704206)=-2951.269218488886; dx=-2.519732287453875E-4 evalInputDelta=129.69217718733762
Fitness changed from -2821.5770413015484 to -2951.269218488886
Iteration 5 complete. Error: -2951.269218488886 Total: 20.9543; Orientation: 1.6807; Line Search: 13.9377
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/6fc8fa7f-e98a-40fc-918c-41814af128f0.jpg)
Adding measurement 6baeb239 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.459e+04, gradient 6.376e-02, dot -0.479; [af6f747f-aa46-4ed0-af18-aeee7ce3d088 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2951.269218488886, -2442.5127430578536, -2316.674124688235, -2232.228258937692
LBFGS Accumulation History: 3 points
Removed measurement 6baeb239 to history. Total: 3
th(0)=-2951.269218488886;dx=-0.004063537943596408
Armijo: th(252000.0000000001)=-2862.1839563522117; dx=0.0011963226233538131 evalInputDelta=-89.08526213667437
New Minimum: -2951.269218488886 > -3046.5846451395373
WOLF (strong): th(126000.00000000004)=-3046.5846451395373; dx=9.740572867448392E-4 evalInputDelta=95.31542665065126
New Minimum: -3046.5846451395373 > -3070.7722155835654
END: th(42000.000000000015)=-3070.7722155835654; dx=-0.0013059560055657916 evalInputDelta=119.50299709467936
Fitness changed from -2951.269218488886 to -3070.7722155835654
Iteration 6 complete. Error: -3070.7722155835654 Total: 25.5073; Orientation: 1.6386; Line Search: 18.3120
Adding measurement 26c29ca6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.106e+04, gradient 4.603e-02, dot -0.674; [af6f747f-aa46-4ed0-af18-aeee7ce3d088 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3070.7722155835654, -2442.5127430578536, -2316.674124688235, -2232.228258937692
LBFGS Accumulation History: 3 points
Removed measurement 26c29ca6 to history. Total: 3
th(0)=-3070.7722155835654;dx=-0.0021090331753593995
New Minimum: -3070.7722155835654 > -3186.821300292817
END: th(90486.25698133915)=-3186.821300292817; dx=-6.535537396797002E-4 evalInputDelta=116.04908470925147
Fitness changed from -3070.7722155835654 to -3186.821300292817
Iteration 7 complete. Error: -3186.821300292817 Total: 15.0351; Orientation: 1.5929; Line Search: 9.1575
Adding measurement 3cd1d0fd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.529e+04, gradient 5.149e-02, dot -0.584; [af6f747f-aa46-4ed0-af18-aeee7ce3d088 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3186.821300292817, -2442.5127430578536, -2316.674124688235, -2232.228258937692
LBFGS Accumulation History: 3 points
Removed measurement 3cd1d0fd to history. Total: 3
th(0)=-3186.821300292817;dx=-0.002647779710268945
New Minimum: -3186.821300292817 > -3222.4507754192305
WOLF (strong): th(194946.7310117368)=-3222.4507754192305; dx=4.3452768187465015E-4 evalInputDelta=35.62947512641358
New Minimum: -3222.4507754192305 > -3269.059344826888
WOLF (strong): th(97473.3655058684)=-3269.059344826888; dx=7.048901465137008E-5 evalInputDelta=82.23804453407092
END: th(32491.121835289465)=-3249.1971316003587; dx=-0.001123978798591366 evalInputDelta=62.37583130754183
Fitness changed from -3186.821300292817 to -3269.059344826888
Iteration 8 complete. Error: -3269.059344826888 Total: 24.5520; Orientation: 1.7277; Line Search: 18.2811
Adding measurement b8c126 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.598e+04, gradient 5.703e-02, dot -0.492; [af6f747f-aa46-4ed0-af18-aeee7ce3d088 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3269.059344826888, -2442.5127430578536, -2316.674124688235, -2232.228258937692
LBFGS Accumulation History: 3 points
Removed measurement b8c126 to history. Total: 3
th(0)=-3269.059344826888;dx=-0.003249980298671347
New Minimum: -3269.059344826888 > -3381.5512712363243
END: th(70000.00000000003)=-3381.5512712363243; dx=-8.152797451890914E-5 evalInputDelta=112.49192640943647
Fitness changed from -3269.059344826888 to -3381.5512712363243
Iteration 9 complete. Error: -3381.5512712363243 Total: 15.1655; Orientation: 1.6020; Line Search: 9.1080
Adding measurement 77f047f7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.200e+04, gradient 4.929e-02, dot -0.566; [af6f747f-aa46-4ed0-af18-aeee7ce3d088 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3381.5512712363243, -2442.5127430578536, -2316.674124688235, -2232.228258937692
LBFGS Accumulation History: 3 points
Removed measurement 77f047f7 to history. Total: 3
th(0)=-3381.5512712363243;dx=-0.002423804114214399
New Minimum: -3381.5512712363243 > -3421.7530594711243
WOLF (strong): th(150810.42830223194)=-3421.7530594711243; dx=7.026784017358733E-4 evalInputDelta=40.201788234800006
New Minimum: -3421.7530594711243 > -3465.6009579869406
END: th(75405.21415111597)=-3465.6009579869406; dx=-9.923802856734605E-5 evalInputDelta=84.04968675061627
Fitness changed from -3381.5512712363243 to -3465.6009579869406
Iteration 10 complete. Error: -3465.6009579869406 Total: 19.7427; Orientation: 1.6595; Line Search: 13.7573
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b80a8a73-7b97-4887-9bb1-940b8b67b91c.jpg)
Final threshold in iteration 11: -3465.6009579869406 (> -Infinity) after 217.559s (< 5400.000s)
Returns
-3465.6009579869406