BasicOptimizer.scala:89 executed in 44.12 seconds (0.796 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: 564442914859400
Reset training subject: 564443598395800
Adding measurement 7b7039ac to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-30.166851671931532;dx=-1.083826137708673E-6
New Minimum: -30.166851671931532 > -30.166855427406897
WOLFE (weak): th(2.154434690031884)=-30.166855427406897; dx=-1.0831843760268763E-6 evalInputDelta=3.7554753653523676E-6
New Minimum: -30.166855427406897 > -30.166856679231913
WOLFE (weak): th(4.308869380063768)=-30.166856679231913; dx=-1.0812896979145164E-6 evalInputDelta=5.00730038055508E-6
New Minimum: -30.166856679231913 > -30.166866693830176
WOLFE (weak): th(12.926608140191302)=-30.166866693830176; dx=-1.083694504786103E-6 evalInputDelta=1.5021898644107523E-5
New Minimum: -30.166866693830176 > -30.1669130113039
WOLFE (weak): th(51.70643256076521)=-30.1669130113039; dx=-1.0832720865022637E-6 evalInputDelta=6.133937236896259E-5
New Minimum: -30.1669130113039 > -30.167164626607864
WOLFE (weak): th(258.53216280382605)=-30.167164626607864; dx=-1.0850792186763433E-6 evalInputDelta=3.129546763318558E-4
New Minimum: -30.167164626607864 > -30.168738113522807
WOLFE (weak): th(1551.1929768229563)=-30.168738113522807; dx=-1.0827835381950323E-6 evalInputDelta=0.0018864415912744903
New Minimum: -30.168738113522807 > -30.180059291978797
WOLFE (weak): th(10858.350837760694)=-30.180059291978797; dx=-1.0808240478306106E-6 evalInputDelta=0.013207620047264612
New Minimum: -30.180059291978797 > -30.272523435041542
WOLFE (weak): th(86866.80670208555)=-30.272523435041542; dx=-1.0774033563223333E-6 evalInputDelta=0.10567176311000992
New Minimum: -30.272523435041542 > -31.0978963655095
WOLFE (weak): th(781801.26031877)=-31.0978963655095; dx=-1.0209749319339312E-6 evalInputDelta=0.9310446935779666
New Minimum: -31.0978963655095 > -34.95167501473601
END: th(7818012.6031877)=-34.95167501473601; dx=-4.16371637607847E-7 evalInputDelta=4.784823342804479
Fitness changed from -30.166851671931532 to -34.95167501473601
Iteration 1 complete. Error: -34.95167501473601 Total: 8.6829; Orientation: 0.0109; Line Search: 6.8252
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/339ea287-2b18-4a61-9643-ade4632c76da.jpg)
Adding measurement 746be7ac to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-34.95167501473601;dx=-8.627843651663363E-7
New Minimum: -34.95167501473601 > -40.36946583947131
END: th(1.684339755941405E7)=-40.36946583947131; dx=-2.0221299517797122E-7 evalInputDelta=5.417790824735299
Fitness changed from -34.95167501473601 to -40.36946583947131
Iteration 2 complete. Error: -40.36946583947131 Total: 2.0038; Orientation: 0.0090; Line Search: 1.1669
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2ba39d3c-475c-43f3-961f-43aadf8b26b6.jpg)
Adding measurement 20fe006e to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-40.36946583947131;dx=-5.758615807578728E-7
New Minimum: -40.36946583947131 > -47.139425580093175
END: th(3.6288E7)=-47.139425580093175; dx=-6.5298115899505E-8 evalInputDelta=6.769959740621864
Fitness changed from -40.36946583947131 to -47.139425580093175
Iteration 3 complete. Error: -47.139425580093175 Total: 1.7984; Orientation: 0.0072; Line Search: 1.1579
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/660e810f-b448-49bc-af02-2229a808f498.jpg)
Adding measurement 6fdc624 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.368e+04, gradient 5.885e-04, dot -0.340; [eedb766c-7fea-41a3-8c4b-fccccecc7c1f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.139425580093175, -40.36946583947131, -34.95167501473601, -30.166851671931532
LBFGS Accumulation History: 3 points
Removed measurement 6fdc624 to history. Total: 3
th(0)=-47.139425580093175;dx=-3.420407859322312E-7
New Minimum: -47.139425580093175 > -53.853618895911794
END: th(7.8180126031877E7)=-53.853618895911794; dx=-9.657356656272316E-9 evalInputDelta=6.714193315818619
Fitness changed from -47.139425580093175 to -53.853618895911794
Iteration 4 complete. Error: -53.853618895911794 Total: 1.9520; Orientation: 0.1488; Line Search: 1.1561
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/77142150-f2f2-4f61-8c82-ef1a9e19eaa4.jpg)
Adding measurement 3aa746cd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.463e+04, gradient 4.368e-04, dot -0.267; [eedb766c-7fea-41a3-8c4b-fccccecc7c1f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -53.853618895911794, -40.36946583947131, -34.95167501473601, -30.166851671931532
LBFGS Accumulation History: 3 points
Removed measurement 3aa746cd to history. Total: 3
th(0)=-53.853618895911794;dx=-1.8907107898272374E-7
New Minimum: -53.853618895911794 > -61.03271414660748
WOLF (strong): th(1.6843397559414053E8)=-61.03271414660748; dx=1.5065697122905453E-9 evalInputDelta=7.179095250695688
New Minimum: -61.03271414660748 > -63.9773486282677
END: th(8.421698779707026E7)=-63.9773486282677; dx=-1.4132378308648119E-8 evalInputDelta=10.123729732355905
Fitness changed from -53.853618895911794 to -63.9773486282677
Iteration 5 complete. Error: -63.9773486282677 Total: 2.9010; Orientation: 0.1753; Line Search: 1.9863
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/9df70bf9-2040-46e7-93ea-3cfa22cd0c41.jpg)
Adding measurement 1a2c73b0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.148e+04, gradient 3.128e-04, dot -0.249; [eedb766c-7fea-41a3-8c4b-fccccecc7c1f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -63.9773486282677, -40.36946583947131, -34.95167501473601, -30.166851671931532
LBFGS Accumulation History: 3 points
Removed measurement 1a2c73b0 to history. Total: 3
th(0)=-63.9773486282677;dx=-9.66967021676872E-8
New Minimum: -63.9773486282677 > -68.33907613420007
WOLF (strong): th(1.8144000000000003E8)=-68.33907613420007; dx=7.519772565482178E-10 evalInputDelta=4.361727505932372
New Minimum: -68.33907613420007 > -70.28516562929839
END: th(9.072000000000001E7)=-70.28516562929839; dx=-1.272087846510867E-8 evalInputDelta=6.307817001030692
Fitness changed from -63.9773486282677 to -70.28516562929839
Iteration 6 complete. Error: -70.28516562929839 Total: 2.5989; Orientation: 0.1503; Line Search: 1.7994
Adding measurement 5b966b9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.138e+04, gradient 2.483e-04, dot -0.239; [eedb766c-7fea-41a3-8c4b-fccccecc7c1f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.28516562929839, -40.36946583947131, -34.95167501473601, -30.166851671931532
LBFGS Accumulation History: 3 points
Removed measurement 5b966b9 to history. Total: 3
th(0)=-70.28516562929839;dx=-6.097437102241164E-8
New Minimum: -70.28516562929839 > -71.48359437821989
WOLF (strong): th(1.9545031507969254E8)=-71.48359437821989; dx=5.091274543439954E-10 evalInputDelta=1.1984287489215006
New Minimum: -71.48359437821989 > -73.53202691566412
END: th(9.772515753984627E7)=-73.53202691566412; dx=-8.990887575833961E-9 evalInputDelta=3.2468612863657285
Fitness changed from -70.28516562929839 to -73.53202691566412
Iteration 7 complete. Error: -73.53202691566412 Total: 2.5387; Orientation: 0.1446; Line Search: 1.8127
Adding measurement 17a7842f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.045e+04, gradient 2.082e-04, dot -0.231; [eedb766c-7fea-41a3-8c4b-fccccecc7c1f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.53202691566412, -40.36946583947131, -34.95167501473601, -30.166851671931532
LBFGS Accumulation History: 3 points
Removed measurement 17a7842f to history. Total: 3
th(0)=-73.53202691566412;dx=-4.270722187967486E-8
New Minimum: -73.53202691566412 > -73.78692653100653
WOLF (strong): th(2.1054246949267572E8)=-73.78692653100653; dx=6.943226336745204E-10 evalInputDelta=0.2548996153424099
New Minimum: -73.78692653100653 > -75.72660598268244
END: th(1.0527123474633786E8)=-75.72660598268244; dx=-5.948941363754977E-9 evalInputDelta=2.1945790670183243
Fitness changed from -73.53202691566412 to -75.72660598268244
Iteration 8 complete. Error: -75.72660598268244 Total: 2.7265; Orientation: 0.1482; Line Search: 1.7933
Adding measurement 7c0ae213 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.694e+03, gradient 1.787e-04, dot -0.225; [eedb766c-7fea-41a3-8c4b-fccccecc7c1f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.72660598268244, -40.36946583947131, -34.95167501473601, -30.166851671931532
LBFGS Accumulation History: 3 points
Removed measurement 7c0ae213 to history. Total: 3
th(0)=-75.72660598268244;dx=-3.1375262757763654E-8
New Minimum: -75.72660598268244 > -76.20385047012401
WOLF (strong): th(2.268000000000001E8)=-76.20385047012401; dx=8.479607231644373E-10 evalInputDelta=0.4772444874415669
New Minimum: -76.20385047012401 > -77.45088807993535
END: th(1.1340000000000004E8)=-77.45088807993535; dx=-4.1988728194947305E-9 evalInputDelta=1.7242820972529103
Fitness changed from -75.72660598268244 to -77.45088807993535
Iteration 9 complete. Error: -77.45088807993535 Total: 2.5958; Orientation: 0.1545; Line Search: 1.8756
Adding measurement 14a689a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.206e+03, gradient 1.595e-04, dot -0.219; [eedb766c-7fea-41a3-8c4b-fccccecc7c1f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.45088807993535, -40.36946583947131, -34.95167501473601, -30.166851671931532
LBFGS Accumulation History: 3 points
Removed measurement 14a689a to history. Total: 3
th(0)=-77.45088807993535;dx=-2.486069745427424E-8
Armijo: th(2.4431289384961572E8)=-76.88153125991731; dx=1.1737247881641545E-9 evalInputDelta=-0.5693568200180437
New Minimum: -77.45088807993535 > -78.38278793283828
END: th(1.2215644692480786E8)=-78.38278793283828; dx=-2.8870303374348992E-9 evalInputDelta=0.9318998529029301
Fitness changed from -77.45088807993535 to -78.38278793283828
Iteration 10 complete. Error: -78.38278793283828 Total: 2.8329; Orientation: 0.2042; Line Search: 2.0116
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f972c0a1-ca4f-4004-85b7-38378195bcc5.jpg)
Adding measurement 7797b489 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.579e+03, gradient 1.394e-04, dot -0.216; [eedb766c-7fea-41a3-8c4b-fccccecc7c1f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.38278793283828, -40.36946583947131, -34.95167501473601, -30.166851671931532
LBFGS Accumulation History: 3 points
Removed measurement 7797b489 to history. Total: 3
th(0)=-78.38278793283828;dx=-1.9183936986208905E-8
Armijo: th(2.631780868658447E8)=-78.30829174842295; dx=1.051577636088344E-9 evalInputDelta=-0.07449618441533801
New Minimum: -78.38278793283828 > -79.40080582739995
END: th(1.3158904343292235E8)=-79.40080582739995; dx=-2.0223431989453605E-9 evalInputDelta=1.018017894561666
Fitness changed from -78.38278793283828 to -79.40080582739995
Iteration 11 complete. Error: -79.40080582739995 Total: 3.1153; Orientation: 0.1857; Line Search: 2.1739
Adding measurement 501286c3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.222e+03, gradient 1.276e-04, dot -0.212; [eedb766c-7fea-41a3-8c4b-fccccecc7c1f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.40080582739995, -40.36946583947131, -34.95167501473601, -30.166851671931532
LBFGS Accumulation History: 3 points
Removed measurement 501286c3 to history. Total: 3
th(0)=-79.40080582739995;dx=-1.5933679085246424E-8
Armijo: th(2.835000000000002E8)=-78.737780107553; dx=1.0801615694623213E-9 evalInputDelta=-0.6630257198469565
New Minimum: -79.40080582739995 > -79.9516689100065
END: th(1.417500000000001E8)=-79.9516689100065; dx=-1.3957724491247432E-9 evalInputDelta=0.5508630826065541
Fitness changed from -79.40080582739995 to -79.9516689100065
Iteration 12 complete. Error: -79.9516689100065 Total: 2.5885; Orientation: 0.1751; Line Search: 1.7756
Adding measurement 4f72b9db to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.092e+03, gradient 1.135e-04, dot -0.204; [eedb766c-7fea-41a3-8c4b-fccccecc7c1f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.9516689100065, -40.36946583947131, -34.95167501473601, -30.166851671931532
LBFGS Accumulation History: 3 points
Removed measurement 4f72b9db to history. Total: 3
th(0)=-79.9516689100065;dx=-1.2611757004858172E-8
Armijo: th(3.053911173120197E8)=-79.50385068584531; dx=9.772983014278074E-10 evalInputDelta=-0.4478182241611961
New Minimum: -79.9516689100065 > -80.58684138280856
END: th(1.5269555865600985E8)=-80.58684138280856; dx=-7.905918261580052E-10 evalInputDelta=0.6351724728020542
Fitness changed from -79.9516689100065 to -80.58684138280856
Iteration 13 complete. Error: -80.58684138280856 Total: 2.4732; Orientation: 0.1451; Line Search: 1.7519
Adding measurement 7d72a503 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.766e+03, gradient 1.043e-04, dot -0.200; [eedb766c-7fea-41a3-8c4b-fccccecc7c1f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.58684138280856, -40.36946583947131, -34.95167501473601, -30.166851671931532
LBFGS Accumulation History: 3 points
Removed measurement 7d72a503 to history. Total: 3
th(0)=-80.58684138280856;dx=-1.063066606954457E-8
Armijo: th(3.289726085823059E8)=-79.87245193115655; dx=9.036413889095561E-10 evalInputDelta=-0.7143894516520106
New Minimum: -80.58684138280856 > -80.8468180352947
END: th(1.6448630429115295E8)=-80.8468180352947; dx=-5.116889226214785E-10 evalInputDelta=0.2599766524861451
Fitness changed from -80.58684138280856 to -80.8468180352947
Iteration 14 complete. Error: -80.8468180352947 Total: 2.5144; Orientation: 0.1434; Line Search: 1.7962
Adding measurement 3faabf8c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.571e+03, gradient 9.624e-05, dot -0.199; [eedb766c-7fea-41a3-8c4b-fccccecc7c1f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.8468180352947, -40.36946583947131, -34.95167501473601, -30.166851671931532
LBFGS Accumulation History: 3 points
Removed measurement 3faabf8c to history. Total: 3
th(0)=-80.8468180352947;dx=-8.966560120067839E-9
Armijo: th(3.5437500000000024E8)=-80.32723812069153; dx=7.204361966767908E-10 evalInputDelta=-0.5195799146031703
New Minimum: -80.8468180352947 > -81.24678067186062
END: th(1.7718750000000012E8)=-81.24678067186062; dx=-3.3789209835906496E-10 evalInputDelta=0.3999626365659168
Fitness changed from -80.8468180352947 to -81.24678067186062
Iteration 15 complete. Error: -81.24678067186062 Total: 2.7351; Orientation: 0.1384; Line Search: 1.7440
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/9ed2a647-9640-4ef7-9500-915e2fd4ecf5.jpg)
Final threshold in iteration 16: -81.24678067186062 (> -Infinity) after 44.119s (< 5400.000s)
Returns
-81.24678067186062