BasicOptimizer.scala:89 executed in 217.89 seconds (3.637 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: 691345172196900
Reset training subject: 691349727322700
Adding measurement 2cd66a06 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-900.9313930594271;dx=-0.006778805480326354
New Minimum: -900.9313930594271 > -900.9462039988847
WOLFE (weak): th(2.154434690031884)=-900.9462039988847; dx=-0.0062826064275503715 evalInputDelta=0.01481093945756129
New Minimum: -900.9462039988847 > -900.9610146948646
WOLFE (weak): th(4.308869380063768)=-900.9610146948646; dx=-0.00628789212351131 evalInputDelta=0.0296216354374792
New Minimum: -900.9610146948646 > -901.0202203613413
WOLFE (weak): th(12.926608140191302)=-901.0202203613413; dx=-0.006280651251381103 evalInputDelta=0.08882730191419341
New Minimum: -901.0202203613413 > -901.2866497402478
WOLFE (weak): th(51.70643256076521)=-901.2866497402478; dx=-0.006277854908751596 evalInputDelta=0.35525668082061657
New Minimum: -901.2866497402478 > -902.706555310196
WOLFE (weak): th(258.53216280382605)=-902.706555310196; dx=-0.006276163786480476 evalInputDelta=1.775162250768858
New Minimum: -902.706555310196 > -911.5320208308647
WOLFE (weak): th(1551.1929768229563)=-911.5320208308647; dx=-0.006217123574239076 evalInputDelta=10.60062777143753
New Minimum: -911.5320208308647 > -971.994759502334
END: th(10858.350837760694)=-971.994759502334; dx=-0.005634142498124864 evalInputDelta=71.06336644290684
Fitness changed from -900.9313930594271 to -971.994759502334
Iteration 1 complete. Error: -971.994759502334 Total: 49.5075; Orientation: 0.1000; Line Search: 35.7620
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5c4dc77b-418c-4388-a686-1bfd4be00a91.jpg)
Adding measurement 2d009745 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-971.994759502334;dx=-0.00536880609522076
New Minimum: -971.994759502334 > -1094.035305646029
END: th(23393.607721408407)=-1094.035305646029; dx=-0.004160288198176846 evalInputDelta=122.040546143695
Fitness changed from -971.994759502334 to -1094.035305646029
Iteration 2 complete. Error: -1094.035305646029 Total: 14.3878; Orientation: 0.0990; Line Search: 8.8489
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/adf0914f-9288-4568-93da-6e07c0457ec5.jpg)
Adding measurement 1286b1ba to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1094.035305646029;dx=-0.00388097770297264
New Minimum: -1094.035305646029 > -1268.9901496859618
END: th(50400.00000000001)=-1268.9901496859618; dx=-0.0025126075258293827 evalInputDelta=174.95484403993282
Fitness changed from -1094.035305646029 to -1268.9901496859618
Iteration 3 complete. Error: -1268.9901496859618 Total: 14.6310; Orientation: 0.1000; Line Search: 9.1481
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/26ce4b38-087a-4e45-a2eb-02e61aef9339.jpg)
Adding measurement 7a859bf9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.222e+04, gradient 5.189e-02, dot -0.806; [6bc80540-e68e-4b6d-820c-01a8847bbf96 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1268.9901496859618, -1094.035305646029, -971.994759502334, -900.9313930594271
LBFGS Accumulation History: 3 points
Removed measurement 7a859bf9 to history. Total: 3
th(0)=-1268.9901496859618;dx=-0.0026911611102409475
New Minimum: -1268.9901496859618 > -1493.26479567423
END: th(108583.50837760697)=-1493.26479567423; dx=-0.0013293792735557478 evalInputDelta=224.27464598826828
Fitness changed from -1268.9901496859618 to -1493.26479567423
Iteration 4 complete. Error: -1493.26479567423 Total: 16.2770; Orientation: 1.7465; Line Search: 9.1396
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7c626642-25f4-4236-b121-e33c4801a86f.jpg)
Adding measurement 50b7a0e4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.317e+04, gradient 5.172e-02, dot -0.591; [6bc80540-e68e-4b6d-820c-01a8847bbf96 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1493.26479567423, -1094.035305646029, -971.994759502334, -900.9313930594271
LBFGS Accumulation History: 3 points
Removed measurement 50b7a0e4 to history. Total: 3
th(0)=-1493.26479567423;dx=-0.0026716190840694962
New Minimum: -1493.26479567423 > -1698.7471854281318
END: th(233936.07721408413)=-1698.7471854281318; dx=-2.586837963354393E-4 evalInputDelta=205.48238975390177
Fitness changed from -1493.26479567423 to -1698.7471854281318
Iteration 5 complete. Error: -1698.7471854281318 Total: 16.7950; Orientation: 1.7209; Line Search: 9.6124
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/7c29f743-c883-446c-b1cb-7a92ddce6708.jpg)
Adding measurement 78bb7be1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.094e+04, gradient 5.979e-02, dot -0.313; [6bc80540-e68e-4b6d-820c-01a8847bbf96 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1698.7471854281318, -1094.035305646029, -971.994759502334, -900.9313930594271
LBFGS Accumulation History: 3 points
Removed measurement 78bb7be1 to history. Total: 3
th(0)=-1698.7471854281318;dx=-0.0035709817223471317
New Minimum: -1698.7471854281318 > -1705.2071721641332
WOLF (strong): th(504000.0000000002)=-1705.2071721641332; dx=5.173947749806721E-4 evalInputDelta=6.459986736001383
New Minimum: -1705.2071721641332 > -1871.8241103266087
WOLF (strong): th(252000.0000000001)=-1871.8241103266087; dx=4.773338012193691E-4 evalInputDelta=173.07692489847682
New Minimum: -1871.8241103266087 > -1891.8934959452658
END: th(84000.00000000003)=-1891.8934959452658; dx=-8.425545949633211E-4 evalInputDelta=193.146310517134
Fitness changed from -1698.7471854281318 to -1891.8934959452658
Iteration 6 complete. Error: -1891.8934959452658 Total: 25.1856; Orientation: 1.6276; Line Search: 18.1111
Adding measurement 672483e1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.819e+04, gradient 4.726e-02, dot -0.433; [6bc80540-e68e-4b6d-820c-01a8847bbf96 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1891.8934959452658, -1094.035305646029, -971.994759502334, -900.9313930594271
LBFGS Accumulation History: 3 points
Removed measurement 672483e1 to history. Total: 3
th(0)=-1891.8934959452658;dx=-0.002229906988622013
New Minimum: -1891.8934959452658 > -2062.4369081259188
END: th(180972.5139626783)=-2062.4369081259188; dx=-1.772946479231089E-4 evalInputDelta=170.54341218065292
Fitness changed from -1891.8934959452658 to -2062.4369081259188
Iteration 7 complete. Error: -2062.4369081259188 Total: 15.5172; Orientation: 1.6893; Line Search: 9.2671
Adding measurement b4cd3b3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.312e+04, gradient 5.830e-02, dot -0.343; [6bc80540-e68e-4b6d-820c-01a8847bbf96 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2062.4369081259188, -1094.035305646029, -971.994759502334, -900.9313930594271
LBFGS Accumulation History: 3 points
Removed measurement b4cd3b3 to history. Total: 3
th(0)=-2062.4369081259188;dx=-0.0033985438507512043
Armijo: th(389893.4620234736)=-2005.050311089475; dx=6.339488525448642E-4 evalInputDelta=-57.386597036443845
New Minimum: -2062.4369081259188 > -2166.298225083518
WOLF (strong): th(194946.7310117368)=-2166.298225083518; dx=6.440423358764211E-4 evalInputDelta=103.86131695759923
New Minimum: -2166.298225083518 > -2203.6762466387845
END: th(64982.24367057893)=-2203.6762466387845; dx=-7.727905652492119E-4 evalInputDelta=141.23933851286574
Fitness changed from -2062.4369081259188 to -2203.6762466387845
Iteration 8 complete. Error: -2203.6762466387845 Total: 24.4819; Orientation: 1.5982; Line Search: 18.2722
Adding measurement 30db1cf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.136e+04, gradient 4.237e-02, dot -0.497; [6bc80540-e68e-4b6d-820c-01a8847bbf96 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2203.6762466387845, -1094.035305646029, -971.994759502334, -900.9313930594271
LBFGS Accumulation History: 3 points
Removed measurement 30db1cf to history. Total: 3
th(0)=-2203.6762466387845;dx=-0.0017934211363200242
New Minimum: -2203.6762466387845 > -2336.6395742604377
END: th(140000.00000000006)=-2336.6395742604377; dx=-3.872904092934359E-4 evalInputDelta=132.9633276216532
Fitness changed from -2203.6762466387845 to -2336.6395742604377
Iteration 9 complete. Error: -2336.6395742604377 Total: 15.3462; Orientation: 1.6774; Line Search: 9.0546
Adding measurement 2784e281 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.741e+04, gradient 5.149e-02, dot -0.405; [6bc80540-e68e-4b6d-820c-01a8847bbf96 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2336.6395742604377, -1094.035305646029, -971.994759502334, -900.9313930594271
LBFGS Accumulation History: 3 points
Removed measurement 2784e281 to history. Total: 3
th(0)=-2336.6395742604377;dx=-0.002649581612400172
New Minimum: -2336.6395742604377 > -2343.581873969843
WOLF (strong): th(301620.8566044639)=-2343.581873969843; dx=5.019537178724104E-4 evalInputDelta=6.942299709405233
New Minimum: -2343.581873969843 > -2430.635307897917
WOLF (strong): th(150810.42830223194)=-2430.635307897917; dx=3.126184818269085E-4 evalInputDelta=93.99573363747913
END: th(50270.142767410645)=-2426.8025259587976; dx=-8.297552964226735E-4 evalInputDelta=90.16295169835985
Fitness changed from -2336.6395742604377 to -2430.635307897917
Iteration 10 complete. Error: -2430.635307897917 Total: 24.6689; Orientation: 1.7524; Line Search: 18.4192
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/69ef8b2d-a47b-474a-a60f-5e5541b15e66.jpg)
Final threshold in iteration 11: -2430.635307897917 (> -Infinity) after 217.887s (< 5400.000s)
Returns
-2430.635307897917