BasicOptimizer.scala:89 executed in 134.30 seconds (1.260 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: 327995441961600
Reset training subject: 327998208766200
Adding measurement 4ad0ce0f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-128.79649840140578;dx=-2.9858402949094042E-5
New Minimum: -128.79649840140578 > -128.7965583093731
END: th(2.154434690031884)=-128.7965583093731; dx=-2.1721707294031985E-5 evalInputDelta=5.9907967312256005E-5
Fitness changed from -128.79649840140578 to -128.7965583093731
Iteration 1 complete. Error: -128.7965583093731 Total: 13.0252; Orientation: 0.0637; Line Search: 5.1562
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0139ede4-53e7-40cb-9687-9622291bd165.jpg)
Adding measurement 4fb7effe to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-128.7965583093731;dx=-2.16174755619437E-5
New Minimum: -128.7965583093731 > -128.79667063673676
WOLFE (weak): th(4.641588833612779)=-128.79667063673676; dx=-2.160288922761583E-5 evalInputDelta=1.1232736366650897E-4
New Minimum: -128.79667063673676 > -128.7967829640024
WOLFE (weak): th(9.283177667225559)=-128.7967829640024; dx=-2.1597444568741737E-5 evalInputDelta=2.2465462930654212E-4
New Minimum: -128.7967829640024 > -128.7972397605402
WOLFE (weak): th(27.849533001676676)=-128.7972397605402; dx=-2.158334474642806E-5 evalInputDelta=6.814511671109358E-4
New Minimum: -128.7972397605402 > -128.79926162739991
WOLFE (weak): th(111.3981320067067)=-128.79926162739991; dx=-2.1576101936669952E-5 evalInputDelta=0.0027033180268176693
New Minimum: -128.79926162739991 > -128.81007433216584
WOLFE (weak): th(556.9906600335335)=-128.81007433216584; dx=-2.1571796775124903E-5 evalInputDelta=0.013516022792742888
New Minimum: -128.81007433216584 > -128.87762569998418
WOLFE (weak): th(3341.9439602012008)=-128.87762569998418; dx=-2.1557052608475827E-5 evalInputDelta=0.08106739061108215
New Minimum: -128.87762569998418 > -129.36203123540128
WOLFE (weak): th(23393.607721408407)=-129.36203123540128; dx=-2.1394941678899827E-5 evalInputDelta=0.5654729260281783
New Minimum: -129.36203123540128 > -133.1635822983814
WOLFE (weak): th(187148.86177126726)=-133.1635822983814; dx=-1.9819175731109902E-5 evalInputDelta=4.367023989008317
New Minimum: -133.1635822983814 > -153.39215646331883
END: th(1684339.7559414054)=-153.39215646331883; dx=-5.642185281383339E-6 evalInputDelta=24.59559815394573
Fitness changed from -128.7965583093731 to -153.39215646331883
Iteration 2 complete. Error: -153.39215646331883 Total: 29.0428; Orientation: 0.0646; Line Search: 25.9697
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d7093835-0497-440a-af2e-d5e4fddfdf66.jpg)
Adding measurement 534c4de1 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-153.39215646331883;dx=-9.751996002358289E-6
New Minimum: -153.39215646331883 > -170.59327439485648
END: th(3628800.0000000005)=-170.59327439485648; dx=-8.168819668696902E-7 evalInputDelta=17.201117931537652
Fitness changed from -153.39215646331883 to -170.59327439485648
Iteration 3 complete. Error: -170.59327439485648 Total: 8.2680; Orientation: 0.0642; Line Search: 5.2611
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c440de8b-5e3d-4801-a217-727f4c3005d7.jpg)
Adding measurement 4567d9e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.402e+03, gradient 3.111e-03, dot -0.312; [1ec83817-8a42-4b1a-9de5-786a163c3223 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -170.59327439485648, -153.39215646331883, -128.7965583093731, -128.79649840140578
LBFGS Accumulation History: 3 points
Removed measurement 4567d9e to history. Total: 3
th(0)=-170.59327439485648;dx=-9.678041569376553E-6
Armijo: th(7818012.603187701)=-167.2583770133533; dx=3.267142795259861E-6 evalInputDelta=-3.3348973815031684
New Minimum: -170.59327439485648 > -180.76399263811626
WOLF (strong): th(3909006.3015938504)=-180.76399263811626; dx=1.8150967098439125E-6 evalInputDelta=10.170718243259785
END: th(1303002.1005312835)=-180.03027181091906; dx=-3.7095590193625675E-6 evalInputDelta=9.436997416062582
Fitness changed from -170.59327439485648 to -180.76399263811626
Iteration 4 complete. Error: -180.76399263811626 Total: 14.5045; Orientation: 1.1036; Line Search: 10.4403
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d65da68c-f62d-4e44-859d-d0e9e1eb4a2f.jpg)
Adding measurement 1f992f23 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.661e+03, gradient 3.235e-03, dot -0.211; [1ec83817-8a42-4b1a-9de5-786a163c3223 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -180.76399263811626, -153.39215646331883, -128.7965583093731, -128.79649840140578
LBFGS Accumulation History: 3 points
Removed measurement 1f992f23 to history. Total: 3
th(0)=-180.76399263811626;dx=-1.0446587168438826E-5
New Minimum: -180.76399263811626 > -194.50870673613005
WOLF (strong): th(2807232.926569009)=-194.50870673613005; dx=7.2373960148946E-7 evalInputDelta=13.744714098013787
END: th(1403616.4632845046)=-192.24300407323906; dx=-4.225645085496349E-6 evalInputDelta=11.4790114351228
Fitness changed from -180.76399263811626 to -194.50870673613005
Iteration 5 complete. Error: -194.50870673613005 Total: 11.5611; Orientation: 1.0536; Line Search: 7.6239
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/7106f864-da84-4e86-9eb0-6ea953adef7d.jpg)
Adding measurement 745ef8a6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.174e+04, gradient 2.497e-03, dot -0.354; [1ec83817-8a42-4b1a-9de5-786a163c3223 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -194.50870673613005, -153.39215646331883, -128.7965583093731, -128.79649840140578
LBFGS Accumulation History: 3 points
Removed measurement 745ef8a6 to history. Total: 3
th(0)=-194.50870673613005;dx=-6.228841262938991E-6
New Minimum: -194.50870673613005 > -203.2385152156321
WOLF (strong): th(3024000.0000000005)=-203.2385152156321; dx=3.929010472955508E-7 evalInputDelta=8.729808479502054
END: th(1512000.0000000002)=-201.77804308146636; dx=-2.5711903151796465E-6 evalInputDelta=7.269336345336313
Fitness changed from -194.50870673613005 to -203.2385152156321
Iteration 6 complete. Error: -203.2385152156321 Total: 12.0498; Orientation: 1.0555; Line Search: 7.7526
Adding measurement 60939be6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.734e+04, gradient 2.377e-03, dot -0.409; [1ec83817-8a42-4b1a-9de5-786a163c3223 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -203.2385152156321, -153.39215646331883, -128.7965583093731, -128.79649840140578
LBFGS Accumulation History: 3 points
Removed measurement 60939be6 to history. Total: 3
th(0)=-203.2385152156321;dx=-5.643472314469793E-6
New Minimum: -203.2385152156321 > -209.62154408872925
WOLF (strong): th(3257505.251328209)=-209.62154408872925; dx=1.2273504301701235E-6 evalInputDelta=6.383028873097146
New Minimum: -209.62154408872925 > -209.71851310869607
END: th(1628752.6256641045)=-209.71851310869607; dx=-1.6982306360028986E-6 evalInputDelta=6.479997893063967
Fitness changed from -203.2385152156321 to -209.71851310869607
Iteration 7 complete. Error: -209.71851310869607 Total: 11.3534; Orientation: 1.0875; Line Search: 7.8290
Adding measurement 5165b8a2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.229e+04, gradient 1.650e-03, dot -0.645; [1ec83817-8a42-4b1a-9de5-786a163c3223 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -209.71851310869607, -153.39215646331883, -128.7965583093731, -128.79649840140578
LBFGS Accumulation History: 3 points
Removed measurement 5165b8a2 to history. Total: 3
th(0)=-209.71851310869607;dx=-2.7190038054801735E-6
New Minimum: -209.71851310869607 > -216.5333626653245
END: th(3509041.158211262)=-216.5333626653245; dx=-1.1489286495424477E-6 evalInputDelta=6.814849556628417
Fitness changed from -209.71851310869607 to -216.5333626653245
Iteration 8 complete. Error: -216.5333626653245 Total: 8.9259; Orientation: 1.0872; Line Search: 5.3469
Adding measurement 77e6ed1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.342e+04, gradient 1.878e-03, dot -0.513; [1ec83817-8a42-4b1a-9de5-786a163c3223 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -216.5333626653245, -153.39215646331883, -128.7965583093731, -128.79649840140578
LBFGS Accumulation History: 3 points
Removed measurement 77e6ed1 to history. Total: 3
th(0)=-216.5333626653245;dx=-3.520084370264581E-6
Armijo: th(7560000.000000003)=-216.3636607645398; dx=1.3467109557067946E-6 evalInputDelta=-0.16970190078470182
New Minimum: -216.5333626653245 > -221.00627916708632
WOLF (strong): th(3780000.0000000014)=-221.00627916708632; dx=3.312042797140118E-7 evalInputDelta=4.47291650176183
END: th(1260000.0000000005)=-220.0148723985203; dx=-1.6747697645095793E-6 evalInputDelta=3.4815097331958214
Fitness changed from -216.5333626653245 to -221.00627916708632
Iteration 9 complete. Error: -221.00627916708632 Total: 13.7551; Orientation: 1.0853; Line Search: 10.2381
Adding measurement 622b5da1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.189e+04, gradient 2.307e-03, dot -0.356; [1ec83817-8a42-4b1a-9de5-786a163c3223 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -221.00627916708632, -153.39215646331883, -128.7965583093731, -128.79649840140578
LBFGS Accumulation History: 3 points
Removed measurement 622b5da1 to history. Total: 3
th(0)=-221.00627916708632;dx=-5.312384215569998E-6
New Minimum: -221.00627916708632 > -227.12319013826075
WOLF (strong): th(2714587.7094401745)=-227.12319013826075; dx=8.327704572900844E-7 evalInputDelta=6.116910971174434
END: th(1357293.8547200873)=-226.53265165507042; dx=-2.0735382452424605E-6 evalInputDelta=5.526372487984105
Fitness changed from -221.00627916708632 to -227.12319013826075
Iteration 10 complete. Error: -227.12319013826075 Total: 11.3722; Orientation: 1.0511; Line Search: 7.8110
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f4940c6e-099d-41b4-8035-8d777d05d3a7.jpg)
Final threshold in iteration 11: -227.12319013826075 (> -Infinity) after 134.302s (< 5400.000s)
Returns
-227.12319013826075