BasicOptimizer.scala:89 executed in 136.19 seconds (1.899 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: 71712729870000
Reset training subject: 71715393645200
Adding measurement 1245baf1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-17.68300716826139;dx=-6.028541091927077E-7
New Minimum: -17.68300716826139 > -17.683008628064957
END: th(2.154434690031884)=-17.683008628064957; dx=-5.074957728868544E-7 evalInputDelta=1.459803566916662E-6
Fitness changed from -17.68300716826139 to -17.683008628064957
Iteration 1 complete. Error: -17.683008628064957 Total: 13.1852; Orientation: 0.0611; Line Search: 5.2166
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 2216ecfe to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-17.683008628064957;dx=-5.062579468097714E-7
New Minimum: -17.683008628064957 > -17.683011547671732
WOLFE (weak): th(4.641588833612779)=-17.683011547671732; dx=-5.058735688637307E-7 evalInputDelta=2.9196067750092425E-6
New Minimum: -17.683011547671732 > -17.683013737376495
WOLFE (weak): th(9.283177667225559)=-17.683013737376495; dx=-5.060849625959567E-7 evalInputDelta=5.109311537410122E-6
New Minimum: -17.683013737376495 > -17.683024685896246
WOLFE (weak): th(27.849533001676676)=-17.683024685896246; dx=-5.057418974521419E-7 evalInputDelta=1.6057831288662783E-5
New Minimum: -17.683024685896246 > -17.68307285930262
WOLFE (weak): th(111.3981320067067)=-17.68307285930262; dx=-5.056548913050122E-7 evalInputDelta=6.423123766197136E-5
New Minimum: -17.68307285930262 > -17.683327592254567
WOLFE (weak): th(556.9906600335335)=-17.683327592254567; dx=-5.057352274655724E-7 evalInputDelta=3.189641896099715E-4
New Minimum: -17.683327592254567 > -17.684917947973165
WOLFE (weak): th(3341.9439602012008)=-17.684917947973165; dx=-5.055607636577443E-7 evalInputDelta=0.0019093199082078627
New Minimum: -17.684917947973165 > -17.696354224992422
WOLFE (weak): th(23393.607721408407)=-17.696354224992422; dx=-5.034297984802592E-7 evalInputDelta=0.013345596927464953
New Minimum: -17.696354224992422 > -17.788333636075453
WOLFE (weak): th(187148.86177126726)=-17.788333636075453; dx=-4.901258359302662E-7 evalInputDelta=0.10532500801049594
New Minimum: -17.788333636075453 > -18.443058508775554
END: th(1684339.7559414054)=-18.443058508775554; dx=-2.76683277492376E-7 evalInputDelta=0.7600498807105964
Fitness changed from -17.683008628064957 to -18.443058508775554
Iteration 2 complete. Error: -18.443058508775554 Total: 29.1878; Orientation: 0.0606; Line Search: 26.1614
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 2a06c22a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-18.443058508775554;dx=-4.294845231256627E-7
New Minimum: -18.443058508775554 > -19.332432214782184
END: th(3628800.0000000005)=-19.332432214782184; dx=-1.2631143602714708E-7 evalInputDelta=0.88937370600663
Fitness changed from -18.443058508775554 to -19.332432214782184
Iteration 3 complete. Error: -19.332432214782184 Total: 8.2959; Orientation: 0.0522; Line Search: 5.2286
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 11e8625f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.644e+03, gradient 6.957e-04, dot -0.532; [2e30f1a6-a8e4-4795-ad18-47d5c061a59b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.332432214782184, -18.443058508775554, -17.683008628064957, -17.68300716826139
LBFGS Accumulation History: 3 points
Removed measurement 11e8625f to history. Total: 3
th(0)=-19.332432214782184;dx=-4.83774357863047E-7
New Minimum: -19.332432214782184 > -20.106841008378566
END: th(7818012.603187701)=-20.106841008378566; dx=-3.2058453530362676E-8 evalInputDelta=0.7744087935963826
Fitness changed from -19.332432214782184 to -20.106841008378566
Iteration 4 complete. Error: -20.106841008378566 Total: 9.5658; Orientation: 1.0565; Line Search: 5.2225
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 119fd7d7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.820e+03, gradient 6.468e-04, dot -0.243; [2e30f1a6-a8e4-4795-ad18-47d5c061a59b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -20.106841008378566, -18.443058508775554, -17.683008628064957, -17.68300716826139
LBFGS Accumulation History: 3 points
Removed measurement 119fd7d7 to history. Total: 3
th(0)=-20.106841008378566;dx=-4.180931588024082E-7
New Minimum: -20.106841008378566 > -21.60463950686373
WOLF (strong): th(1.6843397559414055E7)=-21.60463950686373; dx=7.07288930234363E-9 evalInputDelta=1.4977984984851638
New Minimum: -21.60463950686373 > -21.75912144787229
WOLF (strong): th(8421698.779707028)=-21.75912144787229; dx=4.231537109558313E-9 evalInputDelta=1.6522804394937225
END: th(2807232.926569009)=-21.23269880819243; dx=-2.5546615325037983E-7 evalInputDelta=1.1258577998138648
Fitness changed from -20.106841008378566 to -21.75912144787229
Iteration 5 complete. Error: -21.75912144787229 Total: 14.8650; Orientation: 1.0431; Line Search: 10.8171
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 12f59c9d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.090e+03, gradient 7.111e-04, dot -0.278; [2e30f1a6-a8e4-4795-ad18-47d5c061a59b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -21.75912144787229, -18.443058508775554, -17.683008628064957, -17.68300716826139
LBFGS Accumulation History: 3 points
Removed measurement 12f59c9d to history. Total: 3
th(0)=-21.75912144787229;dx=-5.049286168100025E-7
New Minimum: -21.75912144787229 > -23.422520303265337
WOLF (strong): th(6048000.000000001)=-23.422520303265337; dx=6.509901641386526E-8 evalInputDelta=1.6633988553930479
END: th(3024000.0000000005)=-23.18837037472844; dx=-2.5851976645193937E-7 evalInputDelta=1.4292489268561503
Fitness changed from -21.75912144787229 to -23.422520303265337
Iteration 6 complete. Error: -23.422520303265337 Total: 12.1123; Orientation: 0.9942; Line Search: 7.9399
Adding measurement 62822e15 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.277e+04, gradient 7.283e-04, dot -0.350; [2e30f1a6-a8e4-4795-ad18-47d5c061a59b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -23.422520303265337, -18.443058508775554, -17.683008628064957, -17.68300716826139
LBFGS Accumulation History: 3 points
Removed measurement 62822e15 to history. Total: 3
th(0)=-23.422520303265337;dx=-5.303590981326912E-7
New Minimum: -23.422520303265337 > -24.032008607381442
WOLF (strong): th(6515010.502656418)=-24.032008607381442; dx=1.8782745824893615E-7 evalInputDelta=0.6094883041161054
New Minimum: -24.032008607381442 > -24.569374374227277
END: th(3257505.251328209)=-24.569374374227277; dx=-8.226765134295086E-9 evalInputDelta=1.1468540709619397
Fitness changed from -23.422520303265337 to -24.569374374227277
Iteration 7 complete. Error: -24.569374374227277 Total: 11.4517; Orientation: 0.9780; Line Search: 7.8015
Adding measurement 3f1f3c18 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.207e+04, gradient 6.386e-04, dot -0.481; [2e30f1a6-a8e4-4795-ad18-47d5c061a59b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -24.569374374227277, -18.443058508775554, -17.683008628064957, -17.68300716826139
LBFGS Accumulation History: 3 points
Removed measurement 3f1f3c18 to history. Total: 3
th(0)=-24.569374374227277;dx=-4.0735898030152406E-7
New Minimum: -24.569374374227277 > -24.606006210655146
WOLF (strong): th(7018082.316422524)=-24.606006210655146; dx=8.353857142519702E-8 evalInputDelta=0.03663183642786905
New Minimum: -24.606006210655146 > -25.028660251681902
WOLF (strong): th(3509041.158211262)=-25.028660251681902; dx=9.265339731869384E-8 evalInputDelta=0.4592858774546258
END: th(1169680.3860704207)=-25.003475021744556; dx=-2.185159953984903E-7 evalInputDelta=0.4341006475172797
Fitness changed from -24.569374374227277 to -25.028660251681902
Iteration 8 complete. Error: -25.028660251681902 Total: 14.2132; Orientation: 0.9744; Line Search: 10.6391
Adding measurement 34e99943 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.266e+04, gradient 7.058e-04, dot -0.416; [2e30f1a6-a8e4-4795-ad18-47d5c061a59b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -25.028660251681902, -18.443058508775554, -17.683008628064957, -17.68300716826139
LBFGS Accumulation History: 3 points
Removed measurement 34e99943 to history. Total: 3
th(0)=-25.028660251681902;dx=-4.978289262070182E-7
New Minimum: -25.028660251681902 > -25.766295446648716
WOLF (strong): th(2520000.000000001)=-25.766295446648716; dx=8.008488000103601E-8 evalInputDelta=0.7376351949668134
END: th(1260000.0000000005)=-25.629252912035838; dx=-2.9890531605354225E-7 evalInputDelta=0.6005926603539358
Fitness changed from -25.028660251681902 to -25.766295446648716
Iteration 9 complete. Error: -25.766295446648716 Total: 11.4587; Orientation: 1.0094; Line Search: 7.8120
Adding measurement 74c6be1d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.023e+04, gradient 6.216e-04, dot -0.508; [2e30f1a6-a8e4-4795-ad18-47d5c061a59b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -25.766295446648716, -18.443058508775554, -17.683008628064957, -17.68300716826139
LBFGS Accumulation History: 3 points
Removed measurement 74c6be1d to history. Total: 3
th(0)=-25.766295446648716;dx=-3.860529455441549E-7
New Minimum: -25.766295446648716 > -26.084350345258397
WOLF (strong): th(2714587.7094401745)=-26.084350345258397; dx=1.0782157301540076E-7 evalInputDelta=0.31805489860968095
New Minimum: -26.084350345258397 > -26.14598754995754
END: th(1357293.8547200873)=-26.14598754995754; dx=-7.872000921788398E-8 evalInputDelta=0.3796921033088232
Fitness changed from -25.766295446648716 to -26.14598754995754
Iteration 10 complete. Error: -26.14598754995754 Total: 11.3680; Orientation: 1.0523; Line Search: 7.8670
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -26.14598754995754 (> -Infinity) after 136.192s (< 5400.000s)
Returns
-26.14598754995754