BasicOptimizer.scala:89 executed in 132.10 seconds (1.717 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: 27157951690000
Reset training subject: 27160515206700
Adding measurement 18729e6d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-62.37264645260144;dx=-5.0337439227795E-6
New Minimum: -62.37264645260144 > -62.37265742500631
END: th(2.154434690031884)=-62.37265742500631; dx=-3.359673265637412E-6 evalInputDelta=1.0972404872688912E-5
Fitness changed from -62.37264645260144 to -62.37265742500631
Iteration 1 complete. Error: -62.37265742500631 Total: 12.6412; Orientation: 0.0617; Line Search: 4.9606
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b33d8a8a-87e1-4dee-b636-ff5e963db463.jpg)
Adding measurement 6da4e4f2 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-62.37265742500631;dx=-3.345097626807485E-6
New Minimum: -62.37265742500631 > -62.37267388360999
WOLFE (weak): th(4.641588833612779)=-62.37267388360999; dx=-3.3443064782943477E-6 evalInputDelta=1.6458603681712702E-5
New Minimum: -62.37267388360999 > -62.37269034220933
WOLFE (weak): th(9.283177667225559)=-62.37269034220933; dx=-3.343726713401816E-6 evalInputDelta=3.291720302200929E-5
New Minimum: -62.37269034220933 > -62.372758919659844
WOLFE (weak): th(27.849533001676676)=-62.372758919659844; dx=-3.342920320291431E-6 evalInputDelta=1.0149465353492815E-4
New Minimum: -62.372758919659844 > -62.37306888879553
WOLFE (weak): th(111.3981320067067)=-62.37306888879553; dx=-3.3426922585163384E-6 evalInputDelta=4.11463789220079E-4
New Minimum: -62.37306888879553 > -62.3747092307884
WOLFE (weak): th(556.9906600335335)=-62.3747092307884; dx=-3.3421024343468336E-6 evalInputDelta=0.0020518057820879676
New Minimum: -62.3747092307884 > -62.38496999001776
WOLFE (weak): th(3341.9439602012008)=-62.38496999001776; dx=-3.3411706360890817E-6 evalInputDelta=0.01231256501144884
New Minimum: -62.38496999001776 > -62.458780712560944
WOLFE (weak): th(23393.607721408407)=-62.458780712560944; dx=-3.3363608163298593E-6 evalInputDelta=0.08612328755463494
New Minimum: -62.458780712560944 > -63.055116015402675
WOLFE (weak): th(187148.86177126726)=-63.055116015402675; dx=-3.26848955138536E-6 evalInputDelta=0.6824585903963651
New Minimum: -63.055116015402675 > -67.82096723185875
END: th(1684339.7559414054)=-67.82096723185875; dx=-2.46924277683421E-6 evalInputDelta=5.448309806852436
Fitness changed from -62.37265742500631 to -67.82096723185875
Iteration 2 complete. Error: -67.82096723185875 Total: 28.8196; Orientation: 0.0619; Line Search: 25.6416
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/7fdb4213-349e-4a66-989f-5deb7127771f.jpg)
Adding measurement 256c2a8f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-67.82096723185875;dx=-2.3261311566231765E-6
New Minimum: -67.82096723185875 > -75.04787213270939
END: th(3628800.0000000005)=-75.04787213270939; dx=-1.2939975980009982E-6 evalInputDelta=7.226904900850641
Fitness changed from -67.82096723185875 to -75.04787213270939
Iteration 3 complete. Error: -75.04787213270939 Total: 8.5480; Orientation: 0.0624; Line Search: 5.2494
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/a5158ee7-c044-4b4a-a5af-321f952daead.jpg)
Adding measurement 16028fde to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.331e+03, gradient 1.228e-03, dot -0.658; [39c7c095-225f-4891-8adf-c9e7a4bbb4a7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.04787213270939, -67.82096723185875, -62.37265742500631, -62.37264645260144
LBFGS Accumulation History: 3 points
Removed measurement 16028fde to history. Total: 3
th(0)=-75.04787213270939;dx=-1.5061115746287203E-6
New Minimum: -75.04787213270939 > -83.24450393958826
END: th(7818012.603187701)=-83.24450393958826; dx=-5.071879508683292E-7 evalInputDelta=8.19663180687887
Fitness changed from -75.04787213270939 to -83.24450393958826
Iteration 4 complete. Error: -83.24450393958826 Total: 9.0524; Orientation: 1.1337; Line Search: 5.0785
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/2e13602e-3b2d-4760-a3c5-74e836f06180.jpg)
Adding measurement 1e7de143 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.175e+04, gradient 1.306e-03, dot -0.434; [39c7c095-225f-4891-8adf-c9e7a4bbb4a7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -83.24450393958826, -67.82096723185875, -62.37265742500631, -62.37264645260144
LBFGS Accumulation History: 3 points
Removed measurement 1e7de143 to history. Total: 3
th(0)=-83.24450393958826;dx=-1.704389258421133E-6
Armijo: th(1.6843397559414055E7)=-81.72692119893262; dx=5.479780169543835E-7 evalInputDelta=-1.5175827406556408
New Minimum: -83.24450393958826 > -86.61885266542605
WOLF (strong): th(8421698.779707028)=-86.61885266542605; dx=4.0662310374354167E-7 evalInputDelta=3.374348725837791
New Minimum: -86.61885266542605 > -86.85543400599765
END: th(2807232.926569009)=-86.85543400599765; dx=-6.184691834470855E-7 evalInputDelta=3.610930066409395
Fitness changed from -83.24450393958826 to -86.85543400599765
Iteration 5 complete. Error: -86.85543400599765 Total: 14.2882; Orientation: 1.0582; Line Search: 10.1964
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f6b80117-49be-4179-9fdb-9e6fe6be53d2.jpg)
Adding measurement 15229674 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.554e+04, gradient 9.832e-04, dot -0.639; [39c7c095-225f-4891-8adf-c9e7a4bbb4a7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -86.85543400599765, -67.82096723185875, -62.37265742500631, -62.37264645260144
LBFGS Accumulation History: 3 points
Removed measurement 15229674 to history. Total: 3
th(0)=-86.85543400599765;dx=-9.658147317701803E-7
New Minimum: -86.85543400599765 > -91.13754078253483
END: th(6048000.000000001)=-91.13754078253483; dx=-3.8678488168441596E-7 evalInputDelta=4.2821067765371765
Fitness changed from -86.85543400599765 to -91.13754078253483
Iteration 6 complete. Error: -91.13754078253483 Total: 9.7545; Orientation: 1.0725; Line Search: 5.5136
Adding measurement d715309 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.970e+04, gradient 1.146e-03, dot -0.503; [39c7c095-225f-4891-8adf-c9e7a4bbb4a7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.13754078253483, -67.82096723185875, -62.37265742500631, -62.37264645260144
LBFGS Accumulation History: 3 points
Removed measurement d715309 to history. Total: 3
th(0)=-91.13754078253483;dx=-1.313064188035702E-6
Armijo: th(1.3030021005312836E7)=-91.07702211500835; dx=4.3346531394345555E-7 evalInputDelta=-0.060518667526480385
New Minimum: -91.13754078253483 > -93.7967426850416
WOLF (strong): th(6515010.502656418)=-93.7967426850416; dx=2.3285657205403598E-7 evalInputDelta=2.6592019025067657
END: th(2171670.167552139)=-93.43581434584907; dx=-5.865544965848682E-7 evalInputDelta=2.2982735633142397
Fitness changed from -91.13754078253483 to -93.7967426850416
Iteration 7 complete. Error: -93.7967426850416 Total: 15.3688; Orientation: 1.0424; Line Search: 11.2733
Adding measurement 17ba8b7f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.534e+04, gradient 1.409e-03, dot -0.308; [39c7c095-225f-4891-8adf-c9e7a4bbb4a7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -93.7967426850416, -67.82096723185875, -62.37265742500631, -62.37264645260144
LBFGS Accumulation History: 3 points
Removed measurement 17ba8b7f to history. Total: 3
th(0)=-93.7967426850416;dx=-1.9847274643233115E-6
New Minimum: -93.7967426850416 > -98.16705638691475
WOLF (strong): th(4678721.544281682)=-98.16705638691475; dx=3.706471642342989E-7 evalInputDelta=4.370313701873158
END: th(2339360.772140841)=-97.62077485371482; dx=-8.846092515902587E-7 evalInputDelta=3.8240321686732273
Fitness changed from -93.7967426850416 to -98.16705638691475
Iteration 8 complete. Error: -98.16705638691475 Total: 10.9668; Orientation: 1.0534; Line Search: 7.5135
Adding measurement 2af8abde to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.360e+04, gradient 1.171e-03, dot -0.422; [39c7c095-225f-4891-8adf-c9e7a4bbb4a7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.16705638691475, -67.82096723185875, -62.37265742500631, -62.37264645260144
LBFGS Accumulation History: 3 points
Removed measurement 2af8abde to history. Total: 3
th(0)=-98.16705638691475;dx=-1.3702675902941036E-6
New Minimum: -98.16705638691475 > -100.9008735545329
WOLF (strong): th(5040000.000000001)=-100.9008735545329; dx=2.860185605391636E-7 evalInputDelta=2.7338171676181418
END: th(2520000.0000000005)=-100.7572057503752; dx=-4.6920220731057E-7 evalInputDelta=2.590149363460455
Fitness changed from -98.16705638691475 to -100.9008735545329
Iteration 9 complete. Error: -100.9008735545329 Total: 11.0185; Orientation: 1.0195; Line Search: 7.4443
Adding measurement 2bed24b3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.371e+04, gradient 1.190e-03, dot -0.389; [39c7c095-225f-4891-8adf-c9e7a4bbb4a7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -100.9008735545329, -67.82096723185875, -62.37265742500631, -62.37264645260144
LBFGS Accumulation History: 3 points
Removed measurement 2bed24b3 to history. Total: 3
th(0)=-100.9008735545329;dx=-1.4156367804144925E-6
New Minimum: -100.9008735545329 > -103.4183404760228
WOLF (strong): th(5429175.418880348)=-103.4183404760228; dx=4.6682585450608885E-7 evalInputDelta=2.5174669214899126
New Minimum: -103.4183404760228 > -103.69552969569749
END: th(2714587.709440174)=-103.69552969569749; dx=-3.950537411823885E-7 evalInputDelta=2.7946561411645945
Fitness changed from -100.9008735545329 to -103.69552969569749
Iteration 10 complete. Error: -103.69552969569749 Total: 11.2197; Orientation: 1.0292; Line Search: 7.7193
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/84d3864f-5693-483f-b9c4-66f81592e4dd.jpg)
Final threshold in iteration 11: -103.69552969569749 (> -Infinity) after 132.103s (< 5400.000s)
Returns
-103.69552969569749