BasicOptimizer.scala:89 executed in 85.49 seconds (1.002 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: 304063581110100
Reset training subject: 304065316545800
Adding measurement 3b4464a1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-160.55396060981727;dx=-2.8043027442133664E-5
New Minimum: -160.55396060981727 > -160.55399906715607
END: th(2.154434690031884)=-160.55399906715607; dx=-1.782445891290503E-5 evalInputDelta=3.845733880325497E-5
Fitness changed from -160.55396060981727 to -160.55399906715607
Iteration 1 complete. Error: -160.55399906715607 Total: 8.6203; Orientation: 0.0663; Line Search: 3.5570
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c0b61685-5223-4ae3-a7ee-566de88f57e4.jpg)
Adding measurement 686986fe to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-160.55399906715607;dx=-1.7720602974618396E-5
New Minimum: -160.55399906715607 > -160.55408239135855
WOLFE (weak): th(4.641588833612779)=-160.55408239135855; dx=-1.7706789020739007E-5 evalInputDelta=8.332420247825212E-5
New Minimum: -160.55408239135855 > -160.55417853461535
WOLFE (weak): th(9.283177667225559)=-160.55417853461535; dx=-1.771157091550554E-5 evalInputDelta=1.794674592758838E-4
New Minimum: -160.55417853461535 > -160.554550288
WOLFE (weak): th(27.849533001676676)=-160.554550288; dx=-1.7653167750057377E-5 evalInputDelta=5.512208439313326E-4
New Minimum: -160.554550288 > -160.5561847107729
WOLFE (weak): th(111.3981320067067)=-160.5561847107729; dx=-1.7682375766491515E-5 evalInputDelta=0.0021856436168263826
New Minimum: -160.5561847107729 > -160.56492057860618
WOLFE (weak): th(556.9906600335335)=-160.56492057860618; dx=-1.765744904111563E-5 evalInputDelta=0.010921511450106891
New Minimum: -160.56492057860618 > -160.6194977757188
WOLFE (weak): th(3341.9439602012008)=-160.6194977757188; dx=-1.7665941445766384E-5 evalInputDelta=0.06549870856272832
New Minimum: -160.6194977757188 > -161.01176431919896
WOLFE (weak): th(23393.607721408407)=-161.01176431919896; dx=-1.761581500894746E-5 evalInputDelta=0.45776525204288987
New Minimum: -161.01176431919896 > -164.15613500190844
WOLFE (weak): th(187148.86177126726)=-164.15613500190844; dx=-1.7025947859022635E-5 evalInputDelta=3.6021359347523685
New Minimum: -164.15613500190844 > -186.92234651154686
END: th(1684339.7559414054)=-186.92234651154686; dx=-1.0181404221730147E-5 evalInputDelta=26.368347444390793
Fitness changed from -160.55399906715607 to -186.92234651154686
Iteration 2 complete. Error: -186.92234651154686 Total: 18.5290; Orientation: 0.0655; Line Search: 16.6109
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/dcfb9afe-c740-40d5-b826-3c06667cafe8.jpg)
Adding measurement 727fe214 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-186.92234651154686;dx=-1.2139952619325252E-5
New Minimum: -186.92234651154686 > -216.98522209349463
END: th(3628800.0000000005)=-216.98522209349463; dx=-4.317529937087951E-6 evalInputDelta=30.062875581947765
Fitness changed from -186.92234651154686 to -216.98522209349463
Iteration 3 complete. Error: -216.98522209349463 Total: 5.1160; Orientation: 0.0652; Line Search: 3.1873
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/4f9dabd2-64d0-45b1-8e7d-4a1285403cc5.jpg)
Adding measurement 2e37373b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.313e+04, gradient 3.100e-03, dot -0.421; [1fa039b9-bf11-4627-a980-a186197ca0d9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -216.98522209349463, -186.92234651154686, -160.55399906715607, -160.55396060981727
LBFGS Accumulation History: 3 points
Removed measurement 2e37373b to history. Total: 3
th(0)=-216.98522209349463;dx=-9.601371754810162E-6
New Minimum: -216.98522209349463 > -240.5000841148114
WOLF (strong): th(7818012.603187701)=-240.5000841148114; dx=8.355246157613901E-8 evalInputDelta=23.51486202131676
END: th(3909006.3015938504)=-237.88193268963306; dx=-1.9922661399558107E-6 evalInputDelta=20.896710596138433
Fitness changed from -216.98522209349463 to -240.5000841148114
Iteration 4 complete. Error: -240.5000841148114 Total: 7.8342; Orientation: 1.1291; Line Search: 4.9022
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7a04e139-51cf-47db-8fc0-6e93c3c3a468.jpg)
Adding measurement 49a18ad4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.065e+03, gradient 3.798e-03, dot -0.152; [1fa039b9-bf11-4627-a980-a186197ca0d9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -240.5000841148114, -186.92234651154686, -160.55399906715607, -160.55396060981727
LBFGS Accumulation History: 3 points
Removed measurement 49a18ad4 to history. Total: 3
th(0)=-240.5000841148114;dx=-1.4424933906847607E-5
New Minimum: -240.5000841148114 > -250.30707984620312
WOLF (strong): th(8421698.779707028)=-250.30707984620312; dx=4.6974905009838815E-6 evalInputDelta=9.806995731391737
New Minimum: -250.30707984620312 > -268.37735857395245
WOLF (strong): th(4210849.389853514)=-268.37735857395245; dx=9.375686206491252E-7 evalInputDelta=27.877274459141063
END: th(1403616.4632845046)=-258.47087603864236; dx=-8.727932021792302E-6 evalInputDelta=17.970791923830973
Fitness changed from -240.5000841148114 to -268.37735857395245
Iteration 5 complete. Error: -268.37735857395245 Total: 9.6647; Orientation: 1.1253; Line Search: 6.5949
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b38b315e-1767-4301-b05a-11e08e3478e5.jpg)
Adding measurement 4e31d58 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.845e+04, gradient 3.029e-03, dot -0.257; [1fa039b9-bf11-4627-a980-a186197ca0d9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -268.37735857395245, -186.92234651154686, -160.55399906715607, -160.55396060981727
LBFGS Accumulation History: 3 points
Removed measurement 4e31d58 to history. Total: 3
th(0)=-268.37735857395245;dx=-9.15284211695962E-6
New Minimum: -268.37735857395245 > -285.30501673047075
END: th(3024000.0000000005)=-285.30501673047075; dx=-1.4247073982654352E-6 evalInputDelta=16.927658156518305
Fitness changed from -268.37735857395245 to -285.30501673047075
Iteration 6 complete. Error: -285.30501673047075 Total: 6.1979; Orientation: 1.1109; Line Search: 3.2194
Adding measurement 21944167 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.922e+04, gradient 2.282e-03, dot -0.426; [1fa039b9-bf11-4627-a980-a186197ca0d9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -285.30501673047075, -186.92234651154686, -160.55399906715607, -160.55396060981727
LBFGS Accumulation History: 3 points
Removed measurement 21944167 to history. Total: 3
th(0)=-285.30501673047075;dx=-5.198100341521049E-6
New Minimum: -285.30501673047075 > -297.33024336504576
WOLF (strong): th(6515010.502656418)=-297.33024336504576; dx=4.513250661950037E-7 evalInputDelta=12.025226634575006
END: th(3257505.251328209)=-296.5165545822953; dx=-1.5572419167779567E-6 evalInputDelta=11.211537851824573
Fitness changed from -285.30501673047075 to -297.33024336504576
Iteration 7 complete. Error: -297.33024336504576 Total: 7.7336; Orientation: 1.0450; Line Search: 4.9609
Adding measurement a67caa9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.142e+04, gradient 3.014e-03, dot -0.215; [1fa039b9-bf11-4627-a980-a186197ca0d9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -297.33024336504576, -186.92234651154686, -160.55399906715607, -160.55396060981727
LBFGS Accumulation History: 3 points
Removed measurement a67caa9 to history. Total: 3
th(0)=-297.33024336504576;dx=-9.084306158797145E-6
New Minimum: -297.33024336504576 > -297.55779756663077
WOLF (strong): th(7018082.316422524)=-297.55779756663077; dx=4.4643071331444E-6 evalInputDelta=0.22755420158500783
New Minimum: -297.55779756663077 > -311.64442296894725
WOLF (strong): th(3509041.158211262)=-311.64442296894725; dx=1.0956182320964296E-6 evalInputDelta=14.314179603901493
END: th(1169680.3860704207)=-306.7790840061893; dx=-5.595104338746554E-6 evalInputDelta=9.448840641143534
Fitness changed from -297.33024336504576 to -311.64442296894725
Iteration 8 complete. Error: -311.64442296894725 Total: 9.3048; Orientation: 1.2004; Line Search: 6.4986
Adding measurement 6b24e8f7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.876e+04, gradient 2.250e-03, dot -0.329; [1fa039b9-bf11-4627-a980-a186197ca0d9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -311.64442296894725, -186.92234651154686, -160.55399906715607, -160.55396060981727
LBFGS Accumulation History: 3 points
Removed measurement 6b24e8f7 to history. Total: 3
th(0)=-311.64442296894725;dx=-5.06236496641309E-6
New Minimum: -311.64442296894725 > -320.0368155468134
END: th(2520000.000000001)=-320.0368155468134; dx=-1.2914426579838223E-6 evalInputDelta=8.392392577866133
Fitness changed from -311.64442296894725 to -320.0368155468134
Iteration 9 complete. Error: -320.0368155468134 Total: 6.1756; Orientation: 1.1196; Line Search: 3.5312
Adding measurement 61816092 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.277e+04, gradient 1.653e-03, dot -0.468; [1fa039b9-bf11-4627-a980-a186197ca0d9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -320.0368155468134, -186.92234651154686, -160.55399906715607, -160.55396060981727
LBFGS Accumulation History: 3 points
Removed measurement 61816092 to history. Total: 3
th(0)=-320.0368155468134;dx=-2.7269947855729538E-6
New Minimum: -320.0368155468134 > -328.411391560762
END: th(5429175.418880349)=-328.411391560762; dx=-6.109140571201621E-7 evalInputDelta=8.374576013948626
Fitness changed from -320.0368155468134 to -328.411391560762
Iteration 10 complete. Error: -328.411391560762 Total: 5.9174; Orientation: 1.0907; Line Search: 3.2782
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/6d6d1f2d-e6ac-449b-a1b9-4764c42b261d.jpg)
Final threshold in iteration 11: -328.411391560762 (> -Infinity) after 85.495s (< 5400.000s)
Returns
-328.411391560762