BasicOptimizer.scala:89 executed in 134.72 seconds (1.542 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: 329454994176700
Reset training subject: 329457708396800
Adding measurement 5af297 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-99.49534662378697;dx=-2.476778716656313E-5
New Minimum: -99.49534662378697 > -99.49539993990957
END: th(2.154434690031884)=-99.49539993990957; dx=-2.194633605084961E-5 evalInputDelta=5.3316122603064287E-5
Fitness changed from -99.49534662378697 to -99.49539993990957
Iteration 1 complete. Error: -99.49539993990957 Total: 13.1346; Orientation: 0.0608; Line Search: 5.3000
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/625a1674-7eb0-449b-96ca-f1ecef3f6297.jpg)
Adding measurement 7ce5e2af to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-99.49539993990957;dx=-2.1884216297040953E-5
New Minimum: -99.49539993990957 > -99.49551141898272
WOLFE (weak): th(4.641588833612779)=-99.49551141898272; dx=-2.1882961538405387E-5 evalInputDelta=1.1147907314068561E-4
New Minimum: -99.49551141898272 > -99.4956277448389
WOLFE (weak): th(9.283177667225559)=-99.4956277448389; dx=-2.1879501117844532E-5 evalInputDelta=2.2780492932383822E-4
New Minimum: -99.4956277448389 > -99.4960833531328
WOLFE (weak): th(27.849533001676676)=-99.4960833531328; dx=-2.1881547568042628E-5 evalInputDelta=6.834132232285128E-4
New Minimum: -99.4960833531328 > -99.49813356463794
WOLFE (weak): th(111.3981320067067)=-99.49813356463794; dx=-2.1879970404061684E-5 evalInputDelta=0.002733624728364248
New Minimum: -99.49813356463794 > -99.50907215884742
WOLFE (weak): th(556.9906600335335)=-99.50907215884742; dx=-2.187658215858629E-5 evalInputDelta=0.013672218937841762
New Minimum: -99.50907215884742 > -99.57740025218138
WOLFE (weak): th(3341.9439602012008)=-99.57740025218138; dx=-2.185660076496003E-5 evalInputDelta=0.08200031227180204
New Minimum: -99.57740025218138 > -100.06623684579085
WOLFE (weak): th(23393.607721408407)=-100.06623684579085; dx=-2.1586569459837256E-5 evalInputDelta=0.5708369058812792
New Minimum: -100.06623684579085 > -103.86439407207321
WOLFE (weak): th(187148.86177126726)=-103.86439407207321; dx=-1.9815871152781022E-5 evalInputDelta=4.368994132163635
New Minimum: -103.86439407207321 > -124.43687853114172
END: th(1684339.7559414054)=-124.43687853114172; dx=-5.879519148667638E-6 evalInputDelta=24.94147859123214
Fitness changed from -99.49539993990957 to -124.43687853114172
Iteration 2 complete. Error: -124.43687853114172 Total: 29.2589; Orientation: 0.0604; Line Search: 26.1695
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b56471f3-a1a3-44f2-aea8-2db6bdf8d4a3.jpg)
Adding measurement 60aff22f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-124.43687853114172;dx=-1.1091959012276966E-5
New Minimum: -124.43687853114172 > -143.8921154308724
END: th(3628800.0000000005)=-143.8921154308724; dx=-6.901289925986822E-7 evalInputDelta=19.45523689973068
Fitness changed from -124.43687853114172 to -143.8921154308724
Iteration 3 complete. Error: -143.8921154308724 Total: 8.4746; Orientation: 0.0608; Line Search: 5.0585
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/76e24ae1-1613-48b4-bdfb-3983652f89ac.jpg)
Adding measurement 761a35d4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.804e+03, gradient 3.587e-03, dot -0.336; [9a5e17e8-1208-4ee5-9b51-4f4fd2e4bde0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -143.8921154308724, -124.43687853114172, -99.49539993990957, -99.49534662378697
LBFGS Accumulation History: 3 points
Removed measurement 761a35d4 to history. Total: 3
th(0)=-143.8921154308724;dx=-1.286732167996422E-5
Armijo: th(7818012.603187701)=-136.01183190860587; dx=4.281578299690408E-6 evalInputDelta=-7.880283522266524
New Minimum: -143.8921154308724 > -154.59141002263598
WOLF (strong): th(3909006.3015938504)=-154.59141002263598; dx=3.372752539378267E-6 evalInputDelta=10.69929459176359
New Minimum: -154.59141002263598 > -156.44505229598178
END: th(1303002.1005312835)=-156.44505229598178; dx=-4.47312735536002E-6 evalInputDelta=12.552936865109388
Fitness changed from -143.8921154308724 to -156.44505229598178
Iteration 4 complete. Error: -156.44505229598178 Total: 14.4737; Orientation: 1.0421; Line Search: 10.2338
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/fc2fe3aa-e5cd-48ef-b25d-3f8bdf00cd14.jpg)
Adding measurement 35fdcb75 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.313e+04, gradient 2.386e-03, dot -0.552; [9a5e17e8-1208-4ee5-9b51-4f4fd2e4bde0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -156.44505229598178, -124.43687853114172, -99.49539993990957, -99.49534662378697
LBFGS Accumulation History: 3 points
Removed measurement 35fdcb75 to history. Total: 3
th(0)=-156.44505229598178;dx=-5.689764459958214E-6
New Minimum: -156.44505229598178 > -168.54130804441428
END: th(2807232.926569009)=-168.54130804441428; dx=-2.4132817630465303E-6 evalInputDelta=12.096255748432498
Fitness changed from -156.44505229598178 to -168.54130804441428
Iteration 5 complete. Error: -168.54130804441428 Total: 9.3266; Orientation: 1.0611; Line Search: 5.2963
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/23c38955-934b-4f48-aab7-78eedad9169a.jpg)
Adding measurement 150bcb21 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.862e+04, gradient 2.422e-03, dot -0.543; [9a5e17e8-1208-4ee5-9b51-4f4fd2e4bde0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -168.54130804441428, -124.43687853114172, -99.49539993990957, -99.49534662378697
LBFGS Accumulation History: 3 points
Removed measurement 150bcb21 to history. Total: 3
th(0)=-168.54130804441428;dx=-5.865905717221649E-6
New Minimum: -168.54130804441428 > -176.13854322382355
WOLF (strong): th(6048000.000000001)=-176.13854322382355; dx=9.272809091296768E-7 evalInputDelta=7.597235179409267
New Minimum: -176.13854322382355 > -177.4464404736973
END: th(3024000.0000000005)=-177.4464404736973; dx=-5.784214211575944E-7 evalInputDelta=8.905132429283015
Fitness changed from -168.54130804441428 to -177.4464404736973
Iteration 6 complete. Error: -177.4464404736973 Total: 11.8996; Orientation: 0.9818; Line Search: 7.6769
Adding measurement 19a2c171 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.938e+04, gradient 2.708e-03, dot -0.417; [9a5e17e8-1208-4ee5-9b51-4f4fd2e4bde0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -177.4464404736973, -124.43687853114172, -99.49539993990957, -99.49534662378697
LBFGS Accumulation History: 3 points
Removed measurement 19a2c171 to history. Total: 3
th(0)=-177.4464404736973;dx=-7.329490925429655E-6
Armijo: th(6515010.502656418)=-173.75943936962102; dx=3.4474975899466966E-6 evalInputDelta=-3.6870011040762734
New Minimum: -177.4464404736973 > -184.97520500551028
WOLF (strong): th(3257505.251328209)=-184.97520500551028; dx=1.8261720172945587E-6 evalInputDelta=7.528764531812982
END: th(1085835.0837760696)=-184.06476017253362; dx=-3.644848110269164E-6 evalInputDelta=6.618319698836331
Fitness changed from -177.4464404736973 to -184.97520500551028
Iteration 7 complete. Error: -184.97520500551028 Total: 14.2413; Orientation: 1.1222; Line Search: 10.6522
Adding measurement 5a0ac10e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.857e+04, gradient 3.119e-03, dot -0.303; [9a5e17e8-1208-4ee5-9b51-4f4fd2e4bde0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -184.97520500551028, -124.43687853114172, -99.49539993990957, -99.49534662378697
LBFGS Accumulation History: 3 points
Removed measurement 5a0ac10e to history. Total: 3
th(0)=-184.97520500551028;dx=-9.71885895475871E-6
New Minimum: -184.97520500551028 > -194.85307468050775
WOLF (strong): th(2339360.772140841)=-194.85307468050775; dx=1.3950442407703305E-6 evalInputDelta=9.87786967499747
END: th(1169680.3860704205)=-193.73247466398522; dx=-3.676278795475588E-6 evalInputDelta=8.75726965847494
Fitness changed from -184.97520500551028 to -194.85307468050775
Iteration 8 complete. Error: -194.85307468050775 Total: 11.1835; Orientation: 0.9661; Line Search: 7.6495
Adding measurement 74fdb482 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.681e+04, gradient 2.433e-03, dot -0.439; [9a5e17e8-1208-4ee5-9b51-4f4fd2e4bde0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -194.85307468050775, -124.43687853114172, -99.49539993990957, -99.49534662378697
LBFGS Accumulation History: 3 points
Removed measurement 74fdb482 to history. Total: 3
th(0)=-194.85307468050775;dx=-5.915095965641585E-6
New Minimum: -194.85307468050775 > -202.37055816547874
WOLF (strong): th(2520000.0000000005)=-202.37055816547874; dx=2.585395286931064E-7 evalInputDelta=7.517483484970995
END: th(1260000.0000000002)=-200.85443776444464; dx=-2.7123309715992433E-6 evalInputDelta=6.001363083936894
Fitness changed from -194.85307468050775 to -202.37055816547874
Iteration 9 complete. Error: -202.37055816547874 Total: 11.0190; Orientation: 0.9670; Line Search: 7.5729
Adding measurement 24a5db32 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.962e+04, gradient 2.262e-03, dot -0.463; [9a5e17e8-1208-4ee5-9b51-4f4fd2e4bde0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -202.37055816547874, -124.43687853114172, -99.49539993990957, -99.49534662378697
LBFGS Accumulation History: 3 points
Removed measurement 24a5db32 to history. Total: 3
th(0)=-202.37055816547874;dx=-5.1165003512851165E-6
New Minimum: -202.37055816547874 > -208.29334776956156
WOLF (strong): th(2714587.709440174)=-208.29334776956156; dx=6.262668837404286E-7 evalInputDelta=5.922789604082823
END: th(1357293.854720087)=-207.58541742774395; dx=-1.9487308527889326E-6 evalInputDelta=5.2148592622652075
Fitness changed from -202.37055816547874 to -208.29334776956156
Iteration 10 complete. Error: -208.29334776956156 Total: 11.2446; Orientation: 1.0224; Line Search: 7.7708
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/d102bd89-a147-46ec-b30f-ff93c1664930.jpg)
Final threshold in iteration 11: -208.29334776956156 (> -Infinity) after 134.718s (< 5400.000s)
Returns
-208.29334776956156