BasicOptimizer.scala:89 executed in 130.06 seconds (1.794 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: 32589537662100
Reset training subject: 32592175015400
Adding measurement 624dcb20 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-68.17680432746364;dx=-4.589854008004154E-6
New Minimum: -68.17680432746364 > -68.17681436574493
END: th(2.154434690031884)=-68.17681436574493; dx=-3.1233999130137393E-6 evalInputDelta=1.0038281288871076E-5
Fitness changed from -68.17680432746364 to -68.17681436574493
Iteration 1 complete. Error: -68.17681436574493 Total: 12.6800; Orientation: 0.0626; Line Search: 5.0586
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/23e245ab-1cac-4b21-aade-56280c840e5a.jpg)
Adding measurement 40762098 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-68.17681436574493;dx=-3.0930989735168244E-6
New Minimum: -68.17681436574493 > -68.1768294231641
WOLFE (weak): th(4.641588833612779)=-68.1768294231641; dx=-3.090902758362234E-6 evalInputDelta=1.5057419162189944E-5
New Minimum: -68.1768294231641 > -68.17684699014893
WOLFE (weak): th(9.283177667225559)=-68.17684699014893; dx=-3.090590751722351E-6 evalInputDelta=3.2624403999648166E-5
New Minimum: -68.17684699014893 > -68.17691474847656
WOLFE (weak): th(27.849533001676676)=-68.17691474847656; dx=-3.087979920083264E-6 evalInputDelta=1.003827316310435E-4
New Minimum: -68.17691474847656 > -68.17721087667375
WOLFE (weak): th(111.3981320067067)=-68.17721087667375; dx=-3.085610726737E-6 evalInputDelta=3.965109288230906E-4
New Minimum: -68.17721087667375 > -68.17880442582006
WOLFE (weak): th(556.9906600335335)=-68.17880442582006; dx=-3.0854037575138188E-6 evalInputDelta=0.001990060075129918
New Minimum: -68.17880442582006 > -68.18874381848607
WOLFE (weak): th(3341.9439602012008)=-68.18874381848607; dx=-3.084491875013806E-6 evalInputDelta=0.011929452741142654
New Minimum: -68.18874381848607 > -68.26026171426841
WOLFE (weak): th(23393.607721408407)=-68.26026171426841; dx=-3.0804253052099888E-6 evalInputDelta=0.08344734852347813
New Minimum: -68.26026171426841 > -68.83920730220851
WOLFE (weak): th(187148.86177126726)=-68.83920730220851; dx=-3.0278873402440256E-6 evalInputDelta=0.6623929364635757
New Minimum: -68.83920730220851 > -73.59421317597297
END: th(1684339.7559414054)=-73.59421317597297; dx=-2.4323934764317694E-6 evalInputDelta=5.417398810228036
Fitness changed from -68.17681436574493 to -73.59421317597297
Iteration 2 complete. Error: -73.59421317597297 Total: 29.4173; Orientation: 0.0726; Line Search: 26.0687
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/21da701c-4fc2-40d2-b5b5-4c2c3bad886f.jpg)
Adding measurement 518c8a86 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-73.59421317597297;dx=-2.4046028782725298E-6
New Minimum: -73.59421317597297 > -81.26608411113675
END: th(3628800.0000000005)=-81.26608411113675; dx=-1.3783283553908888E-6 evalInputDelta=7.671870935163781
Fitness changed from -73.59421317597297 to -81.26608411113675
Iteration 3 complete. Error: -81.26608411113675 Total: 8.5568; Orientation: 0.0621; Line Search: 5.2931
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/2d34590a-f75c-426d-8eac-221fdfd0cce6.jpg)
Adding measurement 579ecbca to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.042e+04, gradient 1.218e-03, dot -0.703; [6407f123-a71b-44c6-8370-460be2dbdae8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -81.26608411113675, -73.59421317597297, -68.17681436574493, -68.17680432746364
LBFGS Accumulation History: 3 points
Removed measurement 579ecbca to history. Total: 3
th(0)=-81.26608411113675;dx=-1.4828802015523153E-6
New Minimum: -81.26608411113675 > -90.549733045282
END: th(7818012.603187701)=-90.549733045282; dx=-6.569625852431946E-7 evalInputDelta=9.283648934145248
Fitness changed from -81.26608411113675 to -90.549733045282
Iteration 4 complete. Error: -90.549733045282 Total: 9.1506; Orientation: 1.0653; Line Search: 5.0516
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/659bc672-487a-48ba-8422-2093c5f9b773.jpg)
Adding measurement 3a42a5e1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.305e+04, gradient 1.191e-03, dot -0.494; [6407f123-a71b-44c6-8370-460be2dbdae8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -90.549733045282, -73.59421317597297, -68.17681436574493, -68.17680432746364
LBFGS Accumulation History: 3 points
Removed measurement 3a42a5e1 to history. Total: 3
th(0)=-90.549733045282;dx=-1.4173118407319344E-6
New Minimum: -90.549733045282 > -93.82094170231176
WOLF (strong): th(1.6843397559414055E7)=-93.82094170231176; dx=2.966352561074828E-7 evalInputDelta=3.27120865702976
New Minimum: -93.82094170231176 > -95.79365735358431
END: th(8421698.779707028)=-95.79365735358431; dx=-1.9246700490998606E-8 evalInputDelta=5.2439243083023115
Fitness changed from -90.549733045282 to -95.79365735358431
Iteration 5 complete. Error: -95.79365735358431 Total: 12.1355; Orientation: 1.0400; Line Search: 7.9632
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/182392de-0fb4-4ef4-ad74-352583bd9972.jpg)
Adding measurement e57e664 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.244e+04, gradient 1.443e-03, dot -0.314; [6407f123-a71b-44c6-8370-460be2dbdae8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.79365735358431, -73.59421317597297, -68.17681436574493, -68.17680432746364
LBFGS Accumulation History: 3 points
Removed measurement e57e664 to history. Total: 3
th(0)=-95.79365735358431;dx=-2.0817162674649742E-6
Armijo: th(1.8144000000000004E7)=-88.62084142777337; dx=8.772783473442082E-7 evalInputDelta=-7.172815925810937
New Minimum: -95.79365735358431 > -98.90692810881133
WOLF (strong): th(9072000.000000002)=-98.90692810881133; dx=8.390976320128439E-7 evalInputDelta=3.1132707552270205
New Minimum: -98.90692810881133 > -100.9146957026303
END: th(3024000.0000000005)=-100.9146957026303; dx=-8.005597847222623E-7 evalInputDelta=5.121038349045989
Fitness changed from -95.79365735358431 to -100.9146957026303
Iteration 6 complete. Error: -100.9146957026303 Total: 14.8563; Orientation: 1.0681; Line Search: 10.6918
Adding measurement f12d5ab to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.286e+04, gradient 9.314e-04, dot -0.642; [6407f123-a71b-44c6-8370-460be2dbdae8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -100.9146957026303, -73.59421317597297, -68.17681436574493, -68.17680432746364
LBFGS Accumulation History: 3 points
Removed measurement f12d5ab to history. Total: 3
th(0)=-100.9146957026303;dx=-8.668856342942824E-7
New Minimum: -100.9146957026303 > -105.41065912982968
END: th(6515010.502656418)=-105.41065912982968; dx=-3.996413035217348E-7 evalInputDelta=4.495963427199385
Fitness changed from -100.9146957026303 to -105.41065912982968
Iteration 7 complete. Error: -105.41065912982968 Total: 8.5821; Orientation: 0.9858; Line Search: 5.1296
Adding measurement 4547d3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.648e+04, gradient 9.778e-04, dot -0.565; [6407f123-a71b-44c6-8370-460be2dbdae8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -105.41065912982968, -73.59421317597297, -68.17681436574493, -68.17680432746364
LBFGS Accumulation History: 3 points
Removed measurement 4547d3 to history. Total: 3
th(0)=-105.41065912982968;dx=-9.537667828369597E-7
New Minimum: -105.41065912982968 > -108.18929523855037
WOLF (strong): th(1.4036164632845048E7)=-108.18929523855037; dx=1.5951118366500126E-7 evalInputDelta=2.77863610872069
New Minimum: -108.18929523855037 > -108.86603244783048
END: th(7018082.316422524)=-108.86603244783048; dx=-8.990731465374994E-8 evalInputDelta=3.4553733180007953
Fitness changed from -105.41065912982968 to -108.86603244783048
Iteration 8 complete. Error: -108.86603244783048 Total: 11.6619; Orientation: 1.0696; Line Search: 7.8956
Adding measurement 77f04d94 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.624e+04, gradient 1.134e-03, dot -0.430; [6407f123-a71b-44c6-8370-460be2dbdae8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -108.86603244783048, -73.59421317597297, -68.17681436574493, -68.17680432746364
LBFGS Accumulation History: 3 points
Removed measurement 77f04d94 to history. Total: 3
th(0)=-108.86603244783048;dx=-1.285882758269856E-6
Armijo: th(1.5120000000000006E7)=-106.12522267251899; dx=6.380268671158555E-7 evalInputDelta=-2.74080977531149
New Minimum: -108.86603244783048 > -111.5702711867129
WOLF (strong): th(7560000.000000003)=-111.5702711867129; dx=4.1574797924799735E-7 evalInputDelta=2.704238738882424
New Minimum: -111.5702711867129 > -111.65906308051642
END: th(2520000.000000001)=-111.65906308051642; dx=-6.369804906450842E-7 evalInputDelta=2.793030632685941
Fitness changed from -108.86603244783048 to -111.65906308051642
Iteration 9 complete. Error: -111.65906308051642 Total: 13.8651; Orientation: 1.0272; Line Search: 10.3077
Adding measurement 2f4046f7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.282e+04, gradient 7.787e-04, dot -0.683; [6407f123-a71b-44c6-8370-460be2dbdae8 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -111.65906308051642, -73.59421317597297, -68.17681436574493, -68.17680432746364
LBFGS Accumulation History: 3 points
Removed measurement 2f4046f7 to history. Total: 3
th(0)=-111.65906308051642;dx=-6.058393173453882E-7
New Minimum: -111.65906308051642 > -114.64601117069573
END: th(5429175.418880349)=-114.64601117069573; dx=-3.9977237321464526E-7 evalInputDelta=2.986948090179311
Fitness changed from -111.65906308051642 to -114.64601117069573
Iteration 10 complete. Error: -114.64601117069573 Total: 8.7156; Orientation: 1.0168; Line Search: 5.2136
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/38e19cc6-0db7-4623-ae7b-bf9b27b9af08.jpg)
Final threshold in iteration 11: -114.64601117069573 (> -Infinity) after 130.058s (< 5400.000s)
Returns
-114.64601117069573