BasicOptimizer.scala:89 executed in 95.63 seconds (1.086 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: 283124437873500
Reset training subject: 283126361097800
Adding measurement 232f6b9 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-41.90881733839574;dx=-5.031794392291124E-6
New Minimum: -41.90881733839574 > -41.90882404652931
WOLFE (weak): th(2.154434690031884)=-41.90882404652931; dx=-4.779646061679117E-6 evalInputDelta=6.708133568622543E-6
New Minimum: -41.90882404652931 > -41.90883969883677
WOLFE (weak): th(4.308869380063768)=-41.90883969883677; dx=-4.779655465000157E-6 evalInputDelta=2.236044102943424E-5
New Minimum: -41.90883969883677 > -41.90887994760056
WOLFE (weak): th(12.926608140191302)=-41.90887994760056; dx=-4.779634184522932E-6 evalInputDelta=6.260920481793164E-5
New Minimum: -41.90887994760056 > -41.90906553862239
WOLFE (weak): th(51.70643256076521)=-41.90906553862239; dx=-4.779617498484661E-6 evalInputDelta=2.4820022665039687E-4
New Minimum: -41.90906553862239 > -41.91005385287282
WOLFE (weak): th(258.53216280382605)=-41.91005385287282; dx=-4.779245033342672E-6 evalInputDelta=0.0012365144770782877
New Minimum: -41.91005385287282 > -41.9162314068088
WOLFE (weak): th(1551.1929768229563)=-41.9162314068088; dx=-4.778253429847836E-6 evalInputDelta=0.007414068413055475
New Minimum: -41.9162314068088 > -41.960663741248595
WOLFE (weak): th(10858.350837760694)=-41.960663741248595; dx=-4.769916632335155E-6 evalInputDelta=0.05184640285285269
New Minimum: -41.960663741248595 > -42.32052813660098
WOLFE (weak): th(86866.80670208555)=-42.32052813660098; dx=-4.696194490947148E-6 evalInputDelta=0.4117107982052346
New Minimum: -42.32052813660098 > -45.33417173016582
END: th(781801.26031877)=-45.33417173016582; dx=-3.9778569120623256E-6 evalInputDelta=3.425354391770078
Fitness changed from -41.90881733839574 to -45.33417173016582
Iteration 1 complete. Error: -45.33417173016582 Total: 24.2840; Orientation: 0.0607; Line Search: 18.6892
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ad1c174c-b6a9-42d8-a25a-c8f212f503ad.jpg)
Adding measurement 2813f75a to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-45.33417173016582;dx=-3.6264818228031603E-6
New Minimum: -45.33417173016582 > -50.489832531056805
END: th(1684339.7559414052)=-50.489832531056805; dx=-2.49809016975713E-6 evalInputDelta=5.155660800890985
Fitness changed from -45.33417173016582 to -50.489832531056805
Iteration 2 complete. Error: -50.489832531056805 Total: 5.7352; Orientation: 0.0583; Line Search: 3.6086
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/640291c2-8e49-45fa-96a2-873a87c70144.jpg)
Adding measurement 7840c23c to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-50.489832531056805;dx=-2.2544559672502434E-6
New Minimum: -50.489832531056805 > -56.89664035170402
END: th(3628800.0)=-56.89664035170402; dx=-1.3071811597287597E-6 evalInputDelta=6.4068078206472165
Fitness changed from -50.489832531056805 to -56.89664035170402
Iteration 3 complete. Error: -56.89664035170402 Total: 5.9586; Orientation: 0.0584; Line Search: 3.6306
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/1d3c77f1-0a0f-40cc-aadf-95230d41c893.jpg)
Adding measurement 3bdab837 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.311e+04, gradient 1.236e-03, dot -0.797; [3cd5fd26-2396-478d-8a08-eea32eefb342 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -56.89664035170402, -50.489832531056805, -45.33417173016582, -41.90881733839574
LBFGS Accumulation History: 3 points
Removed measurement 3bdab837 to history. Total: 3
th(0)=-56.89664035170402;dx=-1.527199789953714E-6
New Minimum: -56.89664035170402 > -64.44253735811743
END: th(7818012.6031877)=-64.44253735811743; dx=-5.686178594609314E-7 evalInputDelta=7.545897006413412
Fitness changed from -56.89664035170402 to -64.44253735811743
Iteration 4 complete. Error: -64.44253735811743 Total: 6.8287; Orientation: 1.0126; Line Search: 3.7805
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/1a0edb91-ec75-4f9c-a6b8-5e43b7493e2e.jpg)
Adding measurement 646259b7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.708e+04, gradient 1.395e-03, dot -0.564; [3cd5fd26-2396-478d-8a08-eea32eefb342 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.44253735811743, -50.489832531056805, -45.33417173016582, -41.90881733839574
LBFGS Accumulation History: 3 points
Removed measurement 646259b7 to history. Total: 3
th(0)=-64.44253735811743;dx=-1.9464083967476083E-6
New Minimum: -64.44253735811743 > -65.36608110925553
WOLF (strong): th(1.684339755941405E7)=-65.36608110925553; dx=3.8481822508083844E-7 evalInputDelta=0.923543751138098
New Minimum: -65.36608110925553 > -68.62540414153302
WOLF (strong): th(8421698.779707026)=-68.62540414153302; dx=3.0820842766466404E-7 evalInputDelta=4.182866783415591
END: th(2807232.9265690087)=-68.30520524821364; dx=-7.639751789180363E-7 evalInputDelta=3.862667890096205
Fitness changed from -64.44253735811743 to -68.62540414153302
Iteration 5 complete. Error: -68.62540414153302 Total: 10.7719; Orientation: 1.0069; Line Search: 7.6807
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/35e26aa1-5f89-4ddc-979e-d44eaa084627.jpg)
Adding measurement 984cb78 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.742e+04, gradient 1.678e-03, dot -0.401; [3cd5fd26-2396-478d-8a08-eea32eefb342 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.62540414153302, -50.489832531056805, -45.33417173016582, -41.90881733839574
LBFGS Accumulation History: 3 points
Removed measurement 984cb78 to history. Total: 3
th(0)=-68.62540414153302;dx=-2.815914456520541E-6
New Minimum: -68.62540414153302 > -76.05254054598024
WOLF (strong): th(6048000.0)=-76.05254054598024; dx=4.2413202958151546E-7 evalInputDelta=7.427136404447211
END: th(3024000.0)=-75.00169296893753; dx=-1.2603793338891442E-6 evalInputDelta=6.376288827404508
Fitness changed from -68.62540414153302 to -76.05254054598024
Iteration 6 complete. Error: -76.05254054598024 Total: 8.6625; Orientation: 1.0028; Line Search: 5.6099
Adding measurement 64d50fb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.123e+04, gradient 1.410e-03, dot -0.483; [3cd5fd26-2396-478d-8a08-eea32eefb342 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -76.05254054598024, -50.489832531056805, -45.33417173016582, -41.90881733839574
LBFGS Accumulation History: 3 points
Removed measurement 64d50fb to history. Total: 3
th(0)=-76.05254054598024;dx=-1.9891173750260977E-6
New Minimum: -76.05254054598024 > -80.67822430791881
WOLF (strong): th(6515010.502656417)=-80.67822430791881; dx=3.9732268063189404E-7 evalInputDelta=4.625683761938575
END: th(3257505.2513282085)=-80.45435214782893; dx=-6.58220293106542E-7 evalInputDelta=4.401811601848692
Fitness changed from -76.05254054598024 to -80.67822430791881
Iteration 7 complete. Error: -80.67822430791881 Total: 8.1926; Orientation: 0.9757; Line Search: 5.4815
Adding measurement 71e0c88b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.603e+04, gradient 1.426e-03, dot -0.459; [3cd5fd26-2396-478d-8a08-eea32eefb342 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.67822430791881, -50.489832531056805, -45.33417173016582, -41.90881733839574
LBFGS Accumulation History: 3 points
Removed measurement 71e0c88b to history. Total: 3
th(0)=-80.67822430791881;dx=-2.033092453940606E-6
New Minimum: -80.67822430791881 > -84.84604630054027
WOLF (strong): th(7018082.316422523)=-84.84604630054027; dx=6.084477067460114E-7 evalInputDelta=4.167821992621455
New Minimum: -84.84604630054027 > -85.29293118069894
END: th(3509041.1582112615)=-85.29293118069894; dx=-5.167876302945522E-7 evalInputDelta=4.614706872780133
Fitness changed from -80.67822430791881 to -85.29293118069894
Iteration 8 complete. Error: -85.29293118069894 Total: 8.3596; Orientation: 0.9482; Line Search: 5.3992
Adding measurement 5af58bcd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.897e+04, gradient 9.201e-04, dot -0.723; [3cd5fd26-2396-478d-8a08-eea32eefb342 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -85.29293118069894, -50.489832531056805, -45.33417173016582, -41.90881733839574
LBFGS Accumulation History: 3 points
Removed measurement 5af58bcd to history. Total: 3
th(0)=-85.29293118069894;dx=-8.466403815709044E-7
New Minimum: -85.29293118069894 > -89.77906782917394
END: th(7560000.000000002)=-89.77906782917394; dx=-3.9162826744415034E-7 evalInputDelta=4.4861366484749965
Fitness changed from -85.29293118069894 to -89.77906782917394
Iteration 9 complete. Error: -89.77906782917394 Total: 6.5139; Orientation: 1.0651; Line Search: 3.7170
Adding measurement 45c89745 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.307e+04, gradient 1.052e-03, dot -0.594; [3cd5fd26-2396-478d-8a08-eea32eefb342 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -89.77906782917394, -50.489832531056805, -45.33417173016582, -41.90881733839574
LBFGS Accumulation History: 3 points
Removed measurement 45c89745 to history. Total: 3
th(0)=-89.77906782917394;dx=-1.1076247794925098E-6
New Minimum: -89.77906782917394 > -91.73273059297118
WOLF (strong): th(1.6287526256641045E7)=-91.73273059297118; dx=2.56952667601925E-7 evalInputDelta=1.9536627637972401
New Minimum: -91.73273059297118 > -93.2030753850945
WOLF (strong): th(8143763.128320523)=-93.2030753850945; dx=3.9016465386911094E-8 evalInputDelta=3.4240075559205536
END: th(2714587.709440174)=-92.08919390815402; dx=-5.805704705862281E-7 evalInputDelta=2.310126078980076
Fitness changed from -89.77906782917394 to -93.2030753850945
Iteration 10 complete. Error: -93.2030753850945 Total: 9.9747; Orientation: 1.0055; Line Search: 7.1981
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9538262b-9a3f-4ccc-9eee-5701f66eaa50.jpg)
Final threshold in iteration 11: -93.2030753850945 (> -Infinity) after 95.625s (< 5400.000s)
Returns
-93.2030753850945