BasicOptimizer.scala:89 executed in 92.90 seconds (0.733 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: 281494729811400
Reset training subject: 281496723773600
Adding measurement 6cb63c17 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-59.97371205656154;dx=-4.8044436283010164E-6
New Minimum: -59.97371205656154 > -59.97371830663216
END: th(2.154434690031884)=-59.97371830663216; dx=-3.3561064203905698E-6 evalInputDelta=6.250070619273629E-6
Fitness changed from -59.97371205656154 to -59.97371830663216
Iteration 1 complete. Error: -59.97371830663216 Total: 9.3420; Orientation: 0.0607; Line Search: 3.5693
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5f862385-18e7-4987-ae0a-1cb7ec88d78f.jpg)
Adding measurement 532b32ce to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-59.97371830663216;dx=-3.356110568138945E-6
New Minimum: -59.97371830663216 > -59.97373393180587
WOLFE (weak): th(4.641588833612779)=-59.97373393180587; dx=-3.3561194822324513E-6 evalInputDelta=1.5625173709565843E-5
New Minimum: -59.97373393180587 > -59.973749556975505
WOLFE (weak): th(9.283177667225559)=-59.973749556975505; dx=-3.3561201379145898E-6 evalInputDelta=3.125034334772181E-5
New Minimum: -59.973749556975505 > -59.97381205761335
WOLFE (weak): th(27.849533001676676)=-59.97381205761335; dx=-3.3561141849463566E-6 evalInputDelta=9.375098119335235E-5
New Minimum: -59.97381205761335 > -59.97409330967762
WOLFE (weak): th(111.3981320067067)=-59.97409330967762; dx=-3.3560905200725537E-6 evalInputDelta=3.75003045462563E-4
New Minimum: -59.97409330967762 > -59.97559017347454
WOLFE (weak): th(556.9906600335335)=-59.97559017347454; dx=-3.355988603733848E-6 evalInputDelta=0.0018718668423787221
New Minimum: -59.97559017347454 > -59.98493300924282
WOLFE (weak): th(3341.9439602012008)=-59.98493300924282; dx=-3.355000449261611E-6 evalInputDelta=0.011214702610665483
New Minimum: -59.98493300924282 > -60.052142913341115
WOLFE (weak): th(23393.607721408407)=-60.052142913341115; dx=-3.3485078200503995E-6 evalInputDelta=0.0784246067089569
New Minimum: -60.052142913341115 > -60.595768126561424
WOLFE (weak): th(187148.86177126726)=-60.595768126561424; dx=-3.2904172017811684E-6 evalInputDelta=0.6220498199292663
New Minimum: -60.595768126561424 > -65.10122263528822
END: th(1684339.7559414054)=-65.10122263528822; dx=-2.7107870004704893E-6 evalInputDelta=5.127504328656066
Fitness changed from -59.97371830663216 to -65.10122263528822
Iteration 2 complete. Error: -65.10122263528822 Total: 20.5642; Orientation: 0.0601; Line Search: 18.4180
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/c92e483b-4e48-4bcd-bc68-87ec67934fb9.jpg)
Adding measurement 56fc3dda to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-65.10122263528822;dx=-2.439463574001413E-6
New Minimum: -65.10122263528822 > -72.3501072652358
END: th(3628800.0000000005)=-72.3501072652358; dx=-1.546376900672732E-6 evalInputDelta=7.248884629947582
Fitness changed from -65.10122263528822 to -72.3501072652358
Iteration 3 complete. Error: -72.3501072652358 Total: 5.8601; Orientation: 0.0606; Line Search: 3.7066
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d7452006-c54c-4d43-a8f3-9217ca308529.jpg)
Adding measurement 63ebf462 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.032e+04, gradient 1.210e-03, dot -0.783; [6c2cb306-d885-4663-b516-e5aa013e69ed = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.3501072652358, -65.10122263528822, -59.97371830663216, -59.97371205656154
LBFGS Accumulation History: 3 points
Removed measurement 63ebf462 to history. Total: 3
th(0)=-72.3501072652358;dx=-1.463851309877375E-6
New Minimum: -72.3501072652358 > -80.65660305798596
END: th(7818012.603187701)=-80.65660305798596; dx=-6.991510662397984E-7 evalInputDelta=8.306495792750155
Fitness changed from -72.3501072652358 to -80.65660305798596
Iteration 4 complete. Error: -80.65660305798596 Total: 7.1342; Orientation: 1.0708; Line Search: 3.6664
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e0f75bf0-b8f5-45a1-8b44-59963cf86bf9.jpg)
Adding measurement 15871d33 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.158e+03, gradient 1.026e-03, dot -0.553; [6c2cb306-d885-4663-b516-e5aa013e69ed = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.65660305798596, -65.10122263528822, -59.97371830663216, -59.97371205656154
LBFGS Accumulation History: 3 points
Removed measurement 15871d33 to history. Total: 3
th(0)=-80.65660305798596;dx=-1.052229348950747E-6
New Minimum: -80.65660305798596 > -87.73370385977374
END: th(1.6843397559414055E7)=-87.73370385977374; dx=-6.909326603474076E-8 evalInputDelta=7.077100801787779
Fitness changed from -80.65660305798596 to -87.73370385977374
Iteration 5 complete. Error: -87.73370385977374 Total: 7.1410; Orientation: 1.2532; Line Search: 3.8185
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8b3063c7-aeb1-416f-946c-268ade844fb7.jpg)
Adding measurement 718bfb05 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.676e+03, gradient 1.257e-03, dot -0.222; [6c2cb306-d885-4663-b516-e5aa013e69ed = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.73370385977374, -65.10122263528822, -59.97371830663216, -59.97371205656154
LBFGS Accumulation History: 3 points
Removed measurement 718bfb05 to history. Total: 3
th(0)=-87.73370385977374;dx=-1.5792031653711766E-6
Armijo: th(3.628800000000001E7)=-81.12938714276827; dx=4.073069682431297E-7 evalInputDelta=-6.604316717005474
New Minimum: -87.73370385977374 > -90.24243128706051
WOLF (strong): th(1.8144000000000004E7)=-90.24243128706051; dx=5.655779924251444E-7 evalInputDelta=2.5087274272867717
New Minimum: -90.24243128706051 > -93.82645405737415
END: th(6048000.000000001)=-93.82645405737415; dx=-3.788902984376486E-7 evalInputDelta=6.0927501976004095
Fitness changed from -87.73370385977374 to -93.82645405737415
Iteration 6 complete. Error: -93.82645405737415 Total: 10.5797; Orientation: 1.0567; Line Search: 7.4801
Adding measurement 5c827d41 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.500e+04, gradient 8.490e-04, dot -0.495; [6c2cb306-d885-4663-b516-e5aa013e69ed = 1.000/1.000e+00]
Orientation rejected. Popping history element from -93.82645405737415, -65.10122263528822, -59.97371830663216, -59.97371205656154
LBFGS Accumulation History: 3 points
Removed measurement 5c827d41 to history. Total: 3
th(0)=-93.82645405737415;dx=-7.207872102024253E-7
New Minimum: -93.82645405737415 > -98.20353024136587
END: th(1.3030021005312836E7)=-98.20353024136587; dx=-5.451386452728549E-8 evalInputDelta=4.3770761839917185
Fitness changed from -93.82645405737415 to -98.20353024136587
Iteration 7 complete. Error: -98.20353024136587 Total: 6.6868; Orientation: 1.0571; Line Search: 3.8502
Adding measurement d3a3fad to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.696e+04, gradient 1.031e-03, dot -0.349; [6c2cb306-d885-4663-b516-e5aa013e69ed = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.20353024136587, -65.10122263528822, -59.97371830663216, -59.97371205656154
LBFGS Accumulation History: 3 points
Removed measurement d3a3fad to history. Total: 3
th(0)=-98.20353024136587;dx=-1.0623734778221728E-6
Armijo: th(2.8072329265690096E7)=-94.8619934637368; dx=3.6629210525749393E-7 evalInputDelta=-3.3415367776290736
New Minimum: -98.20353024136587 > -100.47858904610511
WOLF (strong): th(1.4036164632845048E7)=-100.47858904610511; dx=3.795687264300128E-7 evalInputDelta=2.2750588047392455
New Minimum: -100.47858904610511 > -101.62377200982225
END: th(4678721.544281683)=-101.62377200982225; dx=-3.643761291631884E-7 evalInputDelta=3.4202417684563784
Fitness changed from -98.20353024136587 to -101.62377200982225
Iteration 8 complete. Error: -101.62377200982225 Total: 10.5631; Orientation: 1.1901; Line Search: 7.6415
Adding measurement eaeb4cc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.222e+04, gradient 6.825e-04, dot -0.602; [6c2cb306-d885-4663-b516-e5aa013e69ed = 1.000/1.000e+00]
Orientation rejected. Popping history element from -101.62377200982225, -65.10122263528822, -59.97371830663216, -59.97371205656154
LBFGS Accumulation History: 3 points
Removed measurement eaeb4cc to history. Total: 3
th(0)=-101.62377200982225;dx=-4.6577015806168937E-7
New Minimum: -101.62377200982225 > -104.9056427823308
END: th(1.0080000000000004E7)=-104.9056427823308; dx=-2.1010645556218262E-7 evalInputDelta=3.2818707725085545
Fitness changed from -101.62377200982225 to -104.9056427823308
Iteration 9 complete. Error: -104.9056427823308 Total: 6.4256; Orientation: 1.0329; Line Search: 3.6610
Adding measurement 450e2956 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.351e+04, gradient 7.455e-04, dot -0.508; [6c2cb306-d885-4663-b516-e5aa013e69ed = 1.000/1.000e+00]
Orientation rejected. Popping history element from -104.9056427823308, -65.10122263528822, -59.97371830663216, -59.97371205656154
LBFGS Accumulation History: 3 points
Removed measurement 450e2956 to history. Total: 3
th(0)=-104.9056427823308;dx=-5.557447337112215E-7
New Minimum: -104.9056427823308 > -106.7433256516786
WOLF (strong): th(2.1716701675521396E7)=-106.7433256516786; dx=1.115156570612492E-7 evalInputDelta=1.8376828693478018
New Minimum: -106.7433256516786 > -107.43249647641383
END: th(1.0858350837760698E7)=-107.43249647641383; dx=-1.3773361724981716E-8 evalInputDelta=2.52685369408303
Fitness changed from -104.9056427823308 to -107.43249647641383
Iteration 10 complete. Error: -107.43249647641383 Total: 8.2946; Orientation: 0.9761; Line Search: 5.5239
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1520fd43-270c-4ac4-895a-34ccaec941e9.jpg)
Final threshold in iteration 11: -107.43249647641383 (> -Infinity) after 92.897s (< 5400.000s)
Returns
-107.43249647641383