BasicOptimizer.scala:89 executed in 129.68 seconds (1.505 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: 29047658248400
Reset training subject: 29050233895700
Adding measurement 4e99bdc3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-69.58623371852414;dx=-4.8117966166335966E-6
New Minimum: -69.58623371852414 > -69.58624355348582
END: th(2.154434690031884)=-69.58624355348582; dx=-3.4085464561878266E-6 evalInputDelta=9.83496167350495E-6
Fitness changed from -69.58623371852414 to -69.58624355348582
Iteration 1 complete. Error: -69.58624355348582 Total: 12.7988; Orientation: 0.0638; Line Search: 5.0913
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f740b20f-41b3-438b-a64d-53017584a15d.jpg)
Adding measurement 33f698f8 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-69.58624355348582;dx=-3.384203105761373E-6
New Minimum: -69.58624355348582 > -69.58625830592571
WOLFE (weak): th(4.641588833612779)=-69.58625830592571; dx=-3.382319345857121E-6 evalInputDelta=1.4752439895460157E-5
New Minimum: -69.58625830592571 > -69.58627797584072
WOLFE (weak): th(9.283177667225559)=-69.58627797584072; dx=-3.3822206908719695E-6 evalInputDelta=3.442235490069834E-5
New Minimum: -69.58627797584072 > -69.58634682049944
WOLFE (weak): th(27.849533001676676)=-69.58634682049944; dx=-3.3802265959523084E-6 evalInputDelta=1.0326701362828317E-4
New Minimum: -69.58634682049944 > -69.58667383169825
WOLFE (weak): th(111.3981320067067)=-69.58667383169825; dx=-3.3790728958468525E-6 evalInputDelta=4.30278212434132E-4
New Minimum: -69.58667383169825 > -69.58839000061444
WOLFE (weak): th(556.9906600335335)=-69.58839000061444; dx=-3.3788029852422327E-6 evalInputDelta=0.002146447128623663
New Minimum: -69.58839000061444 > -69.59912861816197
WOLFE (weak): th(3341.9439602012008)=-69.59912861816197; dx=-3.3778181404575425E-6 evalInputDelta=0.012885064676154911
New Minimum: -69.59912861816197 > -69.676364411843
WOLFE (weak): th(23393.607721408407)=-69.676364411843; dx=-3.371162847382349E-6 evalInputDelta=0.09012085835718153
New Minimum: -69.676364411843 > -70.30093371909479
WOLFE (weak): th(187148.86177126726)=-70.30093371909479; dx=-3.3087441385252417E-6 evalInputDelta=0.714690165608971
New Minimum: -70.30093371909479 > -75.33321945728989
END: th(1684339.7559414054)=-75.33321945728989; dx=-2.5367647732749156E-6 evalInputDelta=5.746975903804071
Fitness changed from -69.58624355348582 to -75.33321945728989
Iteration 2 complete. Error: -75.33321945728989 Total: 28.5738; Orientation: 0.0636; Line Search: 25.5898
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/1a4c3f99-a37c-4bad-94d8-4fd919c43910.jpg)
Adding measurement 483e3109 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-75.33321945728989;dx=-2.402106666491974E-6
New Minimum: -75.33321945728989 > -82.7707062954068
END: th(3628800.0000000005)=-82.7707062954068; dx=-1.274535382142537E-6 evalInputDelta=7.437486838116911
Fitness changed from -75.33321945728989 to -82.7707062954068
Iteration 3 complete. Error: -82.7707062954068 Total: 8.1101; Orientation: 0.0656; Line Search: 5.0846
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/b899014e-628c-448c-ab28-c193a596d542.jpg)
Adding measurement 55522914 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.390e+03, gradient 1.226e-03, dot -0.633; [d4170d0c-0db0-44e6-998d-d638a68a438e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -82.7707062954068, -75.33321945728989, -69.58624355348582, -69.58623371852414
LBFGS Accumulation History: 3 points
Removed measurement 55522914 to history. Total: 3
th(0)=-82.7707062954068;dx=-1.504069204316752E-6
New Minimum: -82.7707062954068 > -91.44850303139073
END: th(7818012.603187701)=-91.44850303139073; dx=-5.690564242262801E-7 evalInputDelta=8.677796735983932
Fitness changed from -82.7707062954068 to -91.44850303139073
Iteration 4 complete. Error: -91.44850303139073 Total: 9.1119; Orientation: 1.1084; Line Search: 5.0519
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ca8b6a7e-d1e6-42d0-bad7-1dfc437b0dcf.jpg)
Adding measurement 1e86264c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.379e+04, gradient 1.305e-03, dot -0.488; [d4170d0c-0db0-44e6-998d-d638a68a438e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.44850303139073, -75.33321945728989, -69.58624355348582, -69.58623371852414
LBFGS Accumulation History: 3 points
Removed measurement 1e86264c to history. Total: 3
th(0)=-91.44850303139073;dx=-1.704162967147718E-6
Armijo: th(1.6843397559414055E7)=-91.00423980201268; dx=5.274465508638056E-7 evalInputDelta=-0.44426322937805196
New Minimum: -91.44850303139073 > -95.63843255320815
WOLF (strong): th(8421698.779707028)=-95.63843255320815; dx=3.0025101072025325E-7 evalInputDelta=4.189929521817419
END: th(2807232.926569009)=-95.26119219543925; dx=-7.011305279014166E-7 evalInputDelta=3.812689164048521
Fitness changed from -91.44850303139073 to -95.63843255320815
Iteration 5 complete. Error: -95.63843255320815 Total: 14.3052; Orientation: 1.1138; Line Search: 10.3588
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f52b3136-b521-471f-9320-563a8c8fc552.jpg)
Adding measurement 7b347048 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.288e+03, gradient 1.643e-03, dot -0.223; [d4170d0c-0db0-44e6-998d-d638a68a438e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.63843255320815, -75.33321945728989, -69.58624355348582, -69.58623371852414
LBFGS Accumulation History: 3 points
Removed measurement 7b347048 to history. Total: 3
th(0)=-95.63843255320815;dx=-2.698996875882037E-6
New Minimum: -95.63843255320815 > -102.32158225615244
WOLF (strong): th(6048000.000000001)=-102.32158225615244; dx=6.987538776248173E-7 evalInputDelta=6.6831497029442914
END: th(3024000.0000000005)=-102.21609034852841; dx=-9.969963231330412E-7 evalInputDelta=6.577657795320263
Fitness changed from -95.63843255320815 to -102.32158225615244
Iteration 6 complete. Error: -102.32158225615244 Total: 11.6723; Orientation: 1.0938; Line Search: 7.6372
Adding measurement 763759f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.075e+04, gradient 1.432e-03, dot -0.360; [d4170d0c-0db0-44e6-998d-d638a68a438e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -102.32158225615244, -75.33321945728989, -69.58624355348582, -69.58623371852414
LBFGS Accumulation History: 3 points
Removed measurement 763759f to history. Total: 3
th(0)=-102.32158225615244;dx=-2.048573271035837E-6
New Minimum: -102.32158225615244 > -106.48393909929716
WOLF (strong): th(6515010.502656418)=-106.48393909929716; dx=7.212611516331709E-7 evalInputDelta=4.162356843144721
New Minimum: -106.48393909929716 > -107.2276003667813
END: th(3257505.251328209)=-107.2276003667813; dx=-5.177785999393737E-7 evalInputDelta=4.906018110628864
Fitness changed from -102.32158225615244 to -107.2276003667813
Iteration 7 complete. Error: -107.2276003667813 Total: 11.2512; Orientation: 1.0502; Line Search: 7.4918
Adding measurement 487fba79 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.885e+04, gradient 8.797e-04, dot -0.679; [d4170d0c-0db0-44e6-998d-d638a68a438e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -107.2276003667813, -75.33321945728989, -69.58624355348582, -69.58623371852414
LBFGS Accumulation History: 3 points
Removed measurement 487fba79 to history. Total: 3
th(0)=-107.2276003667813;dx=-7.731236705252578E-7
New Minimum: -107.2276003667813 > -111.68474750085475
END: th(7018082.316422524)=-111.68474750085475; dx=-3.9589117038763874E-7 evalInputDelta=4.457147134073452
Fitness changed from -107.2276003667813 to -111.68474750085475
Iteration 8 complete. Error: -111.68474750085475 Total: 8.8115; Orientation: 1.0969; Line Search: 5.3216
Adding measurement 7979815c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.320e+04, gradient 9.727e-04, dot -0.572; [d4170d0c-0db0-44e6-998d-d638a68a438e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -111.68474750085475, -75.33321945728989, -69.58624355348582, -69.58623371852414
LBFGS Accumulation History: 3 points
Removed measurement 7979815c to history. Total: 3
th(0)=-111.68474750085475;dx=-9.447229985343457E-7
New Minimum: -111.68474750085475 > -113.26662909445587
WOLF (strong): th(1.5120000000000006E7)=-113.26662909445587; dx=2.49305281506652E-7 evalInputDelta=1.5818815936011106
New Minimum: -113.26662909445587 > -114.80919038638012
WOLF (strong): th(7560000.000000003)=-114.80919038638012; dx=1.3238974090305745E-8 evalInputDelta=3.1244428855253688
END: th(2520000.000000001)=-113.73184644822705; dx=-5.099969360959452E-7 evalInputDelta=2.047098947372291
Fitness changed from -111.68474750085475 to -114.80919038638012
Iteration 9 complete. Error: -114.80919038638012 Total: 13.7533; Orientation: 1.1277; Line Search: 10.2440
Adding measurement 65f59058 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.053e+04, gradient 1.219e-03, dot -0.393; [d4170d0c-0db0-44e6-998d-d638a68a438e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -114.80919038638012, -75.33321945728989, -69.58624355348582, -69.58623371852414
LBFGS Accumulation History: 3 points
Removed measurement 65f59058 to history. Total: 3
th(0)=-114.80919038638012;dx=-1.4850451482459958E-6
New Minimum: -114.80919038638012 > -118.53037288719105
WOLF (strong): th(5429175.418880349)=-118.53037288719105; dx=2.619852837668351E-7 evalInputDelta=3.721182500810926
END: th(2714587.7094401745)=-118.12580659937217; dx=-6.284654937038854E-7 evalInputDelta=3.316616212992045
Fitness changed from -114.80919038638012 to -118.53037288719105
Iteration 10 complete. Error: -118.53037288719105 Total: 10.8680; Orientation: 1.0865; Line Search: 7.3864
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/98b6ee70-ed54-4640-b67a-6aba1bb47bdf.jpg)
Final threshold in iteration 11: -118.53037288719105 (> -Infinity) after 129.682s (< 5400.000s)
Returns
-118.53037288719105