BasicOptimizer.scala:89 executed in 129.06 seconds (1.509 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: 30345431376600
Reset training subject: 30348039019800
Adding measurement 7249b42c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-77.78962024153198;dx=-5.203807502502433E-6
New Minimum: -77.78962024153198 > -77.7896290393375
END: th(2.154434690031884)=-77.7896290393375; dx=-3.408607620953245E-6 evalInputDelta=8.797805520543989E-6
Fitness changed from -77.78962024153198 to -77.7896290393375
Iteration 1 complete. Error: -77.7896290393375 Total: 12.5032; Orientation: 0.0619; Line Search: 4.9688
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/301493f2-7825-49eb-a8c5-ae7b5c2201e7.jpg)
Adding measurement 322f681c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-77.7896290393375;dx=-3.3835567621663185E-6
New Minimum: -77.7896290393375 > -77.78964663494557
WOLFE (weak): th(4.641588833612779)=-77.78964663494557; dx=-3.382449512957023E-6 evalInputDelta=1.7595608071019342E-5
New Minimum: -77.78964663494557 > -77.78966423054968
WOLFE (weak): th(9.283177667225559)=-77.78966423054968; dx=-3.3813968980298875E-6 evalInputDelta=3.519121217721022E-5
New Minimum: -77.78966423054968 > -77.78973461292625
WOLFE (weak): th(27.849533001676676)=-77.78973461292625; dx=-3.378946286931144E-6 evalInputDelta=1.055735887547371E-4
New Minimum: -77.78973461292625 > -77.79005573171133
WOLFE (weak): th(111.3981320067067)=-77.79005573171133; dx=-3.377294091695046E-6 evalInputDelta=4.266923738356354E-4
New Minimum: -77.79005573171133 > -77.79174928145561
WOLFE (weak): th(556.9906600335335)=-77.79174928145561; dx=-3.3770354360642036E-6 evalInputDelta=0.002120242118110127
New Minimum: -77.79174928145561 > -77.80234522716138
WOLFE (weak): th(3341.9439602012008)=-77.80234522716138; dx=-3.375952764412261E-6 evalInputDelta=0.012716187823883729
New Minimum: -77.80234522716138 > -77.8785767818623
WOLFE (weak): th(23393.607721408407)=-77.8785767818623; dx=-3.3706442181598873E-6 evalInputDelta=0.08894774252479465
New Minimum: -77.8785767818623 > -78.49571237919568
WOLFE (weak): th(187148.86177126726)=-78.49571237919568; dx=-3.3158285566756057E-6 evalInputDelta=0.7060833398581821
New Minimum: -78.49571237919568 > -83.59358419583717
END: th(1684339.7559414054)=-83.59358419583717; dx=-2.693548518088774E-6 evalInputDelta=5.8039551564996685
Fitness changed from -77.7896290393375 to -83.59358419583717
Iteration 2 complete. Error: -83.59358419583717 Total: 28.4944; Orientation: 0.0547; Line Search: 25.4814
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/4c4964a8-6e68-4276-8775-ae853bc901a3.jpg)
Adding measurement 205ea3e4 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-83.59358419583717;dx=-2.6099736605633398E-6
New Minimum: -83.59358419583717 > -91.89042104261395
END: th(3628800.0000000005)=-91.89042104261395; dx=-1.536879408362667E-6 evalInputDelta=8.296836846776785
Fitness changed from -83.59358419583717 to -91.89042104261395
Iteration 3 complete. Error: -91.89042104261395 Total: 8.2007; Orientation: 0.0621; Line Search: 5.1861
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/7d7c6059-5d01-4cf9-8e6e-188bed45bf5a.jpg)
Adding measurement 59fe605c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.136e+04, gradient 1.267e-03, dot -0.721; [2a85a6c8-9aeb-4082-a594-3aa5e3105d6d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.89042104261395, -83.59358419583717, -77.7896290393375, -77.78962024153198
LBFGS Accumulation History: 3 points
Removed measurement 59fe605c to history. Total: 3
th(0)=-91.89042104261395;dx=-1.6034041354104392E-6
New Minimum: -91.89042104261395 > -101.80531543409336
END: th(7818012.603187701)=-101.80531543409336; dx=-7.087949998536101E-7 evalInputDelta=9.914894391479407
Fitness changed from -91.89042104261395 to -101.80531543409336
Iteration 4 complete. Error: -101.80531543409336 Total: 9.0009; Orientation: 1.0546; Line Search: 5.0166
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ec9f6acc-dcb3-4d48-93de-79900ef0a7f3.jpg)
Adding measurement 7df4f55c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.297e+04, gradient 1.190e-03, dot -0.506; [2a85a6c8-9aeb-4082-a594-3aa5e3105d6d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -101.80531543409336, -83.59358419583717, -77.7896290393375, -77.78962024153198
LBFGS Accumulation History: 3 points
Removed measurement 7df4f55c to history. Total: 3
th(0)=-101.80531543409336;dx=-1.4141296936897124E-6
New Minimum: -101.80531543409336 > -106.14563431599761
WOLF (strong): th(1.6843397559414055E7)=-106.14563431599761; dx=2.630273622731431E-7 evalInputDelta=4.340318881904253
New Minimum: -106.14563431599761 > -107.4584232245539
END: th(8421698.779707028)=-107.4584232245539; dx=-7.41147908111779E-8 evalInputDelta=5.653107790460538
Fitness changed from -101.80531543409336 to -107.4584232245539
Iteration 5 complete. Error: -107.4584232245539 Total: 11.6983; Orientation: 1.0930; Line Search: 7.7328
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b8be30c7-2a03-47f2-a48d-8a3ee39b89fe.jpg)
Adding measurement 3c6ab627 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.211e+04, gradient 1.401e-03, dot -0.333; [2a85a6c8-9aeb-4082-a594-3aa5e3105d6d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -107.4584232245539, -83.59358419583717, -77.7896290393375, -77.78962024153198
LBFGS Accumulation History: 3 points
Removed measurement 3c6ab627 to history. Total: 3
th(0)=-107.4584232245539;dx=-1.962860587688253E-6
Armijo: th(1.8144000000000004E7)=-101.73296658127889; dx=8.57514323309145E-7 evalInputDelta=-5.72545664327501
New Minimum: -107.4584232245539 > -110.87345043116102
WOLF (strong): th(9072000.000000002)=-110.87345043116102; dx=7.56003533301034E-7 evalInputDelta=3.415027206607121
New Minimum: -110.87345043116102 > -112.26865561285837
END: th(3024000.0000000005)=-112.26865561285837; dx=-8.050583796858869E-7 evalInputDelta=4.81023238830447
Fitness changed from -107.4584232245539 to -112.26865561285837
Iteration 6 complete. Error: -112.26865561285837 Total: 14.1763; Orientation: 1.0430; Line Search: 10.2859
Adding measurement 3db3da11 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.112e+04, gradient 9.156e-04, dot -0.653; [2a85a6c8-9aeb-4082-a594-3aa5e3105d6d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -112.26865561285837, -83.59358419583717, -77.7896290393375, -77.78962024153198
LBFGS Accumulation History: 3 points
Removed measurement 3db3da11 to history. Total: 3
th(0)=-112.26865561285837;dx=-8.373605234235604E-7
New Minimum: -112.26865561285837 > -116.6932586266765
END: th(6515010.502656418)=-116.6932586266765; dx=-4.122119805649885E-7 evalInputDelta=4.424603013818128
Fitness changed from -112.26865561285837 to -116.6932586266765
Iteration 7 complete. Error: -116.6932586266765 Total: 8.5113; Orientation: 1.0158; Line Search: 5.0611
Adding measurement 68a267be to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.379e+04, gradient 9.553e-04, dot -0.570; [2a85a6c8-9aeb-4082-a594-3aa5e3105d6d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -116.6932586266765, -83.59358419583717, -77.7896290393375, -77.78962024153198
LBFGS Accumulation History: 3 points
Removed measurement 68a267be to history. Total: 3
th(0)=-116.6932586266765;dx=-9.110932435616076E-7
New Minimum: -116.6932586266765 > -119.91816049895691
WOLF (strong): th(1.4036164632845048E7)=-119.91816049895691; dx=1.2037964724517412E-7 evalInputDelta=3.2249018722804124
New Minimum: -119.91816049895691 > -120.18075646353151
END: th(7018082.316422524)=-120.18075646353151; dx=-1.2281676928483388E-7 evalInputDelta=3.487497836855013
Fitness changed from -116.6932586266765 to -120.18075646353151
Iteration 8 complete. Error: -120.18075646353151 Total: 11.1428; Orientation: 0.9859; Line Search: 7.5953
Adding measurement 3143d617 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.390e+04, gradient 1.095e-03, dot -0.445; [2a85a6c8-9aeb-4082-a594-3aa5e3105d6d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -120.18075646353151, -83.59358419583717, -77.7896290393375, -77.78962024153198
LBFGS Accumulation History: 3 points
Removed measurement 3143d617 to history. Total: 3
th(0)=-120.18075646353151;dx=-1.1994925866287821E-6
Armijo: th(1.5120000000000006E7)=-118.61224683964404; dx=5.75666908694253E-7 evalInputDelta=-1.568509623887465
New Minimum: -120.18075646353151 > -123.04553110319115
WOLF (strong): th(7560000.000000003)=-123.04553110319115; dx=3.2574570284102747E-7 evalInputDelta=2.864774639659643
END: th(2520000.000000001)=-122.77392860574433; dx=-6.272850482109741E-7 evalInputDelta=2.593172142212822
Fitness changed from -120.18075646353151 to -123.04553110319115
Iteration 9 complete. Error: -123.04553110319115 Total: 13.7872; Orientation: 0.9817; Line Search: 10.1822
Adding measurement 3b37862 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.316e+04, gradient 1.299e-03, dot -0.319; [2a85a6c8-9aeb-4082-a594-3aa5e3105d6d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -123.04553110319115, -83.59358419583717, -77.7896290393375, -77.78962024153198
LBFGS Accumulation History: 3 points
Removed measurement 3b37862 to history. Total: 3
th(0)=-123.04553110319115;dx=-1.686024620364843E-6
New Minimum: -123.04553110319115 > -127.14247110494254
WOLF (strong): th(5429175.418880349)=-127.14247110494254; dx=3.408686852552333E-7 evalInputDelta=4.096940001751392
END: th(2714587.7094401745)=-126.77248673116814; dx=-6.922622078164965E-7 evalInputDelta=3.7269556279769915
Fitness changed from -123.04553110319115 to -127.14247110494254
Iteration 10 complete. Error: -127.14247110494254 Total: 11.0829; Orientation: 1.1117; Line Search: 7.5643
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c5c6b2c6-2859-445a-a075-c15cd8204df1.jpg)
Final threshold in iteration 11: -127.14247110494254 (> -Infinity) after 129.060s (< 5400.000s)
Returns
-127.14247110494254