BasicOptimizer.scala:89 executed in 235.19 seconds (2.959 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: 4724199650583
Reset training subject: 4729368307959
Adding measurement 2da9507b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-14.939007759094238;dx=-2.130270506361365E-6
New Minimum: -14.939007759094238 > -14.939013093709946
WOLFE (weak): th(2.154434690031884)=-14.939013093709946; dx=-1.985082331731297E-6 evalInputDelta=5.334615707397461E-6
New Minimum: -14.939013093709946 > -14.939018413424492
WOLFE (weak): th(4.308869380063768)=-14.939018413424492; dx=-1.9851296274347734E-6 evalInputDelta=1.0654330253601074E-5
New Minimum: -14.939018413424492 > -14.939038693904877
WOLFE (weak): th(12.926608140191302)=-14.939038693904877; dx=-1.985023913840463E-6 evalInputDelta=3.0934810638427734E-5
New Minimum: -14.939038693904877 > -14.939130201935768
WOLFE (weak): th(51.70643256076521)=-14.939130201935768; dx=-1.984673227596214E-6 evalInputDelta=1.224428415298462E-4
New Minimum: -14.939130201935768 > -14.9396231174469
WOLFE (weak): th(258.53216280382605)=-14.9396231174469; dx=-1.984370165278795E-6 evalInputDelta=6.153583526611328E-4
New Minimum: -14.9396231174469 > -14.94269360601902
WOLFE (weak): th(1551.1929768229563)=-14.94269360601902; dx=-1.9791909332451932E-6 evalInputDelta=0.0036858469247817993
New Minimum: -14.94269360601902 > -14.964625999331474
WOLFE (weak): th(10858.350837760694)=-14.964625999331474; dx=-1.9520421795205245E-6 evalInputDelta=0.025618240237236023
New Minimum: -14.964625999331474 > -15.131812691688538
END: th(86866.80670208555)=-15.131812691688538; dx=-1.7110433508219346E-6 evalInputDelta=0.19280493259429932
Fitness changed from -14.939007759094238 to -15.131812691688538
Iteration 1 complete. Error: -15.131812691688538 Total: 60.3088; Orientation: 0.0289; Line Search: 44.9529
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/346f21df-169b-49d6-a991-4bd6633c609f.jpg)
Adding measurement 668e00aa to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-15.131812691688538;dx=-1.5519199823545936E-6
New Minimum: -15.131812691688538 > -15.437609523534775
END: th(187148.86177126726)=-15.437609523534775; dx=-1.1860240359193022E-6 evalInputDelta=0.3057968318462372
Fitness changed from -15.131812691688538 to -15.437609523534775
Iteration 2 complete. Error: -15.437609523534775 Total: 16.1838; Orientation: 0.0289; Line Search: 10.2310
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/521078b4-3598-493d-8bc9-9b2dc1a221b1.jpg)
Adding measurement 39f2153 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-15.437609523534775;dx=-1.0683138183094706E-6
New Minimum: -15.437609523534775 > -15.863749146461487
END: th(403200.00000000006)=-15.863749146461487; dx=-7.18903814190808E-7 evalInputDelta=0.42613962292671204
Fitness changed from -15.437609523534775 to -15.863749146461487
Iteration 3 complete. Error: -15.863749146461487 Total: 16.2678; Orientation: 0.0307; Line Search: 10.8570
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/320ed30c-bcf5-43e9-a2d3-b4f54fead3c4.jpg)
Adding measurement 430f683d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.323e+03, gradient 8.559e-04, dot -0.869; [ef4d305b-ce28-461d-99be-1bc9ec708cd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.863749146461487, -15.437609523534775, -15.131812691688538, -14.939007759094238
LBFGS Accumulation History: 3 points
Removed measurement 430f683d to history. Total: 3
th(0)=-15.863749146461487;dx=-7.317056095198417E-7
New Minimum: -15.863749146461487 > -16.398111820220947
END: th(868668.0670208557)=-16.398111820220947; dx=-3.707858432207818E-7 evalInputDelta=0.5343626737594604
Fitness changed from -15.863749146461487 to -16.398111820220947
Iteration 4 complete. Error: -16.398111820220947 Total: 15.9231; Orientation: 0.5973; Line Search: 10.3052
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d4b2a01f-aa83-4cc8-8c7d-8efa5711329a.jpg)
Adding measurement 597baca7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.447e+03, gradient 8.249e-04, dot -0.688; [ef4d305b-ce28-461d-99be-1bc9ec708cd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.398111820220947, -15.437609523534775, -15.131812691688538, -14.939007759094238
LBFGS Accumulation History: 3 points
Removed measurement 597baca7 to history. Total: 3
th(0)=-16.398111820220947;dx=-6.798630839335239E-7
New Minimum: -16.398111820220947 > -16.762420624494553
END: th(1871488.617712673)=-16.762420624494553; dx=-3.795006335551873E-8 evalInputDelta=0.36430880427360535
Fitness changed from -16.398111820220947 to -16.762420624494553
Iteration 5 complete. Error: -16.762420624494553 Total: 16.2010; Orientation: 0.5996; Line Search: 10.1572
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/7c5747af-e16c-4508-b97f-54662f84ca28.jpg)
Adding measurement 23728384 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.136e+03, gradient 1.024e-03, dot -0.385; [ef4d305b-ce28-461d-99be-1bc9ec708cd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.762420624494553, -15.437609523534775, -15.131812691688538, -14.939007759094238
LBFGS Accumulation History: 3 points
Removed measurement 23728384 to history. Total: 3
th(0)=-16.762420624494553;dx=-1.0482253105425565E-6
Armijo: th(4032000.0000000014)=-16.27781030535698; dx=2.2631288372370796E-7 evalInputDelta=-0.48461031913757324
New Minimum: -16.762420624494553 > -16.950578063726425
WOLF (strong): th(2016000.0000000007)=-16.950578063726425; dx=2.4802293306158217E-7 evalInputDelta=0.18815743923187256
New Minimum: -16.950578063726425 > -17.216063618659973
END: th(672000.0000000002)=-17.216063618659973; dx=-1.3246888091135674E-7 evalInputDelta=0.45364299416542053
Fitness changed from -16.762420624494553 to -17.216063618659973
Iteration 6 complete. Error: -17.216063618659973 Total: 26.7855; Orientation: 0.6091; Line Search: 20.8245
Adding measurement 6ad18762 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.550e+03, gradient 7.455e-04, dot -0.499; [ef4d305b-ce28-461d-99be-1bc9ec708cd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.216063618659973, -15.437609523534775, -15.131812691688538, -14.939007759094238
LBFGS Accumulation History: 3 points
Removed measurement 6ad18762 to history. Total: 3
th(0)=-17.216063618659973;dx=-5.552288581864611E-7
New Minimum: -17.216063618659973 > -17.4942107796669
WOLF (strong): th(1447780.1117014263)=-17.4942107796669; dx=7.410565258663577E-8 evalInputDelta=0.2781471610069275
New Minimum: -17.4942107796669 > -17.499379605054855
END: th(723890.0558507132)=-17.499379605054855; dx=-1.293080136826643E-7 evalInputDelta=0.2833159863948822
Fitness changed from -17.216063618659973 to -17.499379605054855
Iteration 7 complete. Error: -17.499379605054855 Total: 20.4542; Orientation: 0.6086; Line Search: 14.7849
Adding measurement 1698d4ff to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.909e+03, gradient 6.234e-04, dot -0.585; [ef4d305b-ce28-461d-99be-1bc9ec708cd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.499379605054855, -15.437609523534775, -15.131812691688538, -14.939007759094238
LBFGS Accumulation History: 3 points
Removed measurement 1698d4ff to history. Total: 3
th(0)=-17.499379605054855;dx=-3.882736790116307E-7
New Minimum: -17.499379605054855 > -17.735398441553116
WOLF (strong): th(1559573.8480938943)=-17.735398441553116; dx=2.9641238567265674E-8 evalInputDelta=0.2360188364982605
END: th(779786.9240469472)=-17.71977013349533; dx=-1.088289489954536E-7 evalInputDelta=0.22039052844047546
Fitness changed from -17.499379605054855 to -17.735398441553116
Iteration 8 complete. Error: -17.735398441553116 Total: 20.9776; Orientation: 0.6289; Line Search: 15.0591
Adding measurement 52bf454d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.979e+03, gradient 7.959e-04, dot -0.411; [ef4d305b-ce28-461d-99be-1bc9ec708cd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.735398441553116, -15.437609523534775, -15.131812691688538, -14.939007759094238
LBFGS Accumulation History: 3 points
Removed measurement 52bf454d to history. Total: 3
th(0)=-17.735398441553116;dx=-6.333030229102488E-7
New Minimum: -17.735398441553116 > -17.858480036258698
WOLF (strong): th(1680000.0000000007)=-17.858480036258698; dx=2.864663293842764E-7 evalInputDelta=0.12308159470558167
New Minimum: -17.858480036258698 > -18.048425018787384
END: th(840000.0000000003)=-18.048425018787384; dx=-2.8131868727007136E-8 evalInputDelta=0.3130265772342682
Fitness changed from -17.735398441553116 to -18.048425018787384
Iteration 9 complete. Error: -18.048425018787384 Total: 21.0193; Orientation: 0.6135; Line Search: 15.2385
Adding measurement 7ec74ca8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.322e+03, gradient 5.429e-04, dot -0.584; [ef4d305b-ce28-461d-99be-1bc9ec708cd2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.048425018787384, -15.437609523534775, -15.131812691688538, -14.939007759094238
LBFGS Accumulation History: 3 points
Removed measurement 7ec74ca8 to history. Total: 3
th(0)=-18.048425018787384;dx=-2.943490111691137E-7
New Minimum: -18.048425018787384 > -18.219937533140182
WOLF (strong): th(1809725.139626783)=-18.219937533140182; dx=7.318554815144206E-8 evalInputDelta=0.17151251435279846
New Minimum: -18.219937533140182 > -18.242155581712723
END: th(904862.5698133915)=-18.242155581712723; dx=-7.642599484063253E-8 evalInputDelta=0.19373056292533875
Fitness changed from -18.048425018787384 to -18.242155581712723
Iteration 10 complete. Error: -18.242155581712723 Total: 20.4478; Orientation: 0.6085; Line Search: 14.8055
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9e6ad2dc-d43f-44ca-943d-699af61f5275.jpg)
Final threshold in iteration 11: -18.242155581712723 (> -Infinity) after 235.190s (< 5400.000s)
Returns
-18.242155581712723