BasicOptimizer.scala:89 executed in 281.81 seconds (3.039 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: 645387570103800
Reset training subject: 645393287811100
Adding measurement 6d4f1cb4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-37.57426377720817;dx=-1.8352767247554817E-6
New Minimum: -37.57426377720817 > -37.574267797366566
END: th(2.154434690031884)=-37.574267797366566; dx=-1.6106694117248044E-6 evalInputDelta=4.020158399953289E-6
Fitness changed from -37.57426377720817 to -37.574267797366566
Iteration 1 complete. Error: -37.574267797366566 Total: 28.5205; Orientation: 0.1435; Line Search: 11.2858
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/bb66ecf8-0e84-4227-9954-b64a5651709a.jpg)
Adding measurement 77e52327 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-37.574267797366566;dx=-1.6081720513213902E-6
New Minimum: -37.574267797366566 > -37.57427583768208
WOLFE (weak): th(4.641588833612779)=-37.57427583768208; dx=-1.6076090302052547E-6 evalInputDelta=8.040315513824225E-6
New Minimum: -37.57427583768208 > -37.57428588807406
WOLFE (weak): th(9.283177667225559)=-37.57428588807406; dx=-1.607294032323256E-6 evalInputDelta=1.8090707492035563E-5
New Minimum: -37.57428588807406 > -37.57431804931031
WOLFE (weak): th(27.849533001676676)=-37.57431804931031; dx=-1.6065701006605522E-6 evalInputDelta=5.02519437404203E-5
New Minimum: -37.57431804931031 > -37.57446679466991
WOLFE (weak): th(111.3981320067067)=-37.57446679466991; dx=-1.6058118446177959E-6 evalInputDelta=1.9899730334316246E-4
New Minimum: -37.57446679466991 > -37.57526076331853
WOLFE (weak): th(556.9906600335335)=-37.57526076331853; dx=-1.6053407148243267E-6 evalInputDelta=9.929659519656298E-4
New Minimum: -37.57526076331853 > -37.58021917024595
WOLFE (weak): th(3341.9439602012008)=-37.58021917024595; dx=-1.6055554478217759E-6 evalInputDelta=0.005951372879380301
New Minimum: -37.58021917024595 > -37.61588554769427
WOLFE (weak): th(23393.607721408407)=-37.61588554769427; dx=-1.6031164092183988E-6 evalInputDelta=0.04161775032770265
New Minimum: -37.61588554769427 > -37.90523503053019
WOLFE (weak): th(187148.86177126726)=-37.90523503053019; dx=-1.5838970049993533E-6 evalInputDelta=0.3309672331636264
New Minimum: -37.90523503053019 > -40.35607358385249
END: th(1684339.7559414054)=-40.35607358385249; dx=-1.362441313012835E-6 evalInputDelta=2.7818057864859256
Fitness changed from -37.574267797366566 to -40.35607358385249
Iteration 2 complete. Error: -40.35607358385249 Total: 64.6308; Orientation: 0.1392; Line Search: 57.6835
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/53917a76-34ed-4991-be92-66cab1cfb4ff.jpg)
Adding measurement 208808ac to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-40.35607358385249;dx=-1.2846043802728456E-6
New Minimum: -40.35607358385249 > -44.62237629939988
END: th(3628800.0000000005)=-44.62237629939988; dx=-8.645991873716419E-7 evalInputDelta=4.26630271554739
Fitness changed from -40.35607358385249 to -44.62237629939988
Iteration 3 complete. Error: -44.62237629939988 Total: 18.1503; Orientation: 0.1336; Line Search: 11.3470
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/8f66202b-50fb-4a71-b738-be386982842b.jpg)
Adding measurement 6827fef8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.221e+03, gradient 9.064e-04, dot -0.812; [89b732d2-77fc-4e51-b624-679f50a4a3e8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.62237629939988, -40.35607358385249, -37.574267797366566, -37.57426377720817
LBFGS Accumulation History: 3 points
Removed measurement 6827fef8 to history. Total: 3
th(0)=-44.62237629939988;dx=-8.212299687741969E-7
New Minimum: -44.62237629939988 > -50.142347662765864
END: th(7818012.603187701)=-50.142347662765864; dx=-4.769263597805492E-7 evalInputDelta=5.519971363365983
Fitness changed from -44.62237629939988 to -50.142347662765864
Iteration 4 complete. Error: -50.142347662765864 Total: 21.1280; Orientation: 2.4699; Line Search: 11.7350
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a31e94a2-24fe-4080-851d-d0f95ef6ff2d.jpg)
Adding measurement 3426323a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.385e+03, gradient 7.965e-04, dot -0.630; [89b732d2-77fc-4e51-b624-679f50a4a3e8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -50.142347662765864, -40.35607358385249, -37.574267797366566, -37.57426377720817
LBFGS Accumulation History: 3 points
Removed measurement 3426323a to history. Total: 3
th(0)=-50.142347662765864;dx=-6.333906554055547E-7
New Minimum: -50.142347662765864 > -56.45785890107122
END: th(1.6843397559414055E7)=-56.45785890107122; dx=-1.783871985819576E-7 evalInputDelta=6.315511238305355
Fitness changed from -50.142347662765864 to -56.45785890107122
Iteration 5 complete. Error: -56.45785890107122 Total: 20.2669; Orientation: 2.4105; Line Search: 11.3871
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/6f1ac810-a7dc-4257-bf44-b7e1cfa605f0.jpg)
Adding measurement 3e9f309d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.273e+04, gradient 9.375e-04, dot -0.374; [89b732d2-77fc-4e51-b624-679f50a4a3e8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -56.45785890107122, -40.35607358385249, -37.574267797366566, -37.57426377720817
LBFGS Accumulation History: 3 points
Removed measurement 3e9f309d to history. Total: 3
th(0)=-56.45785890107122;dx=-8.772736885135803E-7
Armijo: th(3.628800000000001E7)=-56.03511891472734; dx=1.548348456363504E-7 evalInputDelta=-0.42273998634387766
New Minimum: -56.45785890107122 > -59.95943096078648
WOLF (strong): th(1.8144000000000004E7)=-59.95943096078648; dx=1.798836646011047E-7 evalInputDelta=3.501572059715258
New Minimum: -59.95943096078648 > -60.515659666805085
END: th(6048000.000000001)=-60.515659666805085; dx=-3.119502546221276E-7 evalInputDelta=4.057800765733866
Fitness changed from -56.45785890107122 to -60.515659666805085
Iteration 6 complete. Error: -60.515659666805085 Total: 32.8538; Orientation: 2.5781; Line Search: 23.5485
Adding measurement 6216e97d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.155e+04, gradient 6.878e-04, dot -0.638; [89b732d2-77fc-4e51-b624-679f50a4a3e8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -60.515659666805085, -40.35607358385249, -37.574267797366566, -37.57426377720817
LBFGS Accumulation History: 3 points
Removed measurement 6216e97d to history. Total: 3
th(0)=-60.515659666805085;dx=-4.730438192954526E-7
New Minimum: -60.515659666805085 > -64.71553072473347
END: th(1.3030021005312836E7)=-64.71553072473347; dx=-1.6997487805433975E-7 evalInputDelta=4.199871057928384
Fitness changed from -60.515659666805085 to -64.71553072473347
Iteration 7 complete. Error: -64.71553072473347 Total: 19.4659; Orientation: 2.3889; Line Search: 11.4185
Adding measurement 25defa20 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.811e+04, gradient 7.981e-04, dot -0.506; [89b732d2-77fc-4e51-b624-679f50a4a3e8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.71553072473347, -40.35607358385249, -37.574267797366566, -37.57426377720817
LBFGS Accumulation History: 3 points
Removed measurement 25defa20 to history. Total: 3
th(0)=-64.71553072473347;dx=-6.367641813397737E-7
New Minimum: -64.71553072473347 > -65.98255788172538
WOLF (strong): th(2.8072329265690096E7)=-65.98255788172538; dx=1.1182166067098298E-7 evalInputDelta=1.2670271569919151
New Minimum: -65.98255788172538 > -67.8371927352374
WOLF (strong): th(1.4036164632845048E7)=-67.8371927352374; dx=6.097303107772817E-8 evalInputDelta=3.1216620105039254
END: th(4678721.544281683)=-67.1933516723478; dx=-3.117239186524561E-7 evalInputDelta=2.477820947614333
Fitness changed from -64.71553072473347 to -67.8371927352374
Iteration 8 complete. Error: -67.8371927352374 Total: 30.7728; Orientation: 2.3376; Line Search: 22.9404
Adding measurement 10ee538 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.955e+04, gradient 9.191e-04, dot -0.375; [89b732d2-77fc-4e51-b624-679f50a4a3e8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.8371927352374, -40.35607358385249, -37.574267797366566, -37.57426377720817
LBFGS Accumulation History: 3 points
Removed measurement 10ee538 to history. Total: 3
th(0)=-67.8371927352374;dx=-8.443799880356914E-7
New Minimum: -67.8371927352374 > -72.59621166002619
WOLF (strong): th(1.0080000000000004E7)=-72.59621166002619; dx=2.9962208638768285E-8 evalInputDelta=4.759018924788791
END: th(5040000.000000002)=-71.54039824096654; dx=-4.498268635295946E-7 evalInputDelta=3.7032055057291444
Fitness changed from -67.8371927352374 to -72.59621166002619
Iteration 9 complete. Error: -72.59621166002619 Total: 25.3335; Orientation: 2.3596; Line Search: 17.3698
Adding measurement 5c0e1fe3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.230e+04, gradient 7.274e-04, dot -0.523; [89b732d2-77fc-4e51-b624-679f50a4a3e8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.59621166002619, -40.35607358385249, -37.574267797366566, -37.57426377720817
LBFGS Accumulation History: 3 points
Removed measurement 5c0e1fe3 to history. Total: 3
th(0)=-72.59621166002619;dx=-5.286507747859811E-7
New Minimum: -72.59621166002619 > -75.68433373141423
END: th(1.0858350837760698E7)=-75.68433373141423; dx=-3.0414974403762993E-8 evalInputDelta=3.0881220713880424
Fitness changed from -72.59621166002619 to -75.68433373141423
Iteration 10 complete. Error: -75.68433373141423 Total: 19.6146; Orientation: 2.3758; Line Search: 11.6779
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/cc84f250-6e56-4f53-b124-bfdd2ff9888e.jpg)
Final threshold in iteration 11: -75.68433373141423 (> -Infinity) after 281.806s (< 5400.000s)
Returns
-75.68433373141423