BasicOptimizer.scala:89 executed in 157.20 seconds (3.115 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: 467602602138000
Reset training subject: 467605500074400
Adding measurement 4b18a73a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-83.76357910832806;dx=-1.3299226117021404E-5
New Minimum: -83.76357910832806 > -83.76360564260118
END: th(2.154434690031884)=-83.76360564260118; dx=-1.1256883391838394E-5 evalInputDelta=2.6534273118272722E-5
Fitness changed from -83.76357910832806 to -83.76360564260118
Iteration 1 complete. Error: -83.76360564260118 Total: 14.4741; Orientation: 0.1046; Line Search: 5.7159
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7762292e-dae8-44f3-a153-2a2f6b017883.jpg)
Adding measurement 4999e2b7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-83.76360564260118;dx=-1.1316516219930525E-5
New Minimum: -83.76360564260118 > -83.76366202790364
WOLFE (weak): th(4.641588833612779)=-83.76366202790364; dx=-1.1298307784401677E-5 evalInputDelta=5.638530245732909E-5
New Minimum: -83.76366202790364 > -83.76371841316815
WOLFE (weak): th(9.283177667225559)=-83.76371841316815; dx=-1.1298772672846005E-5 evalInputDelta=1.1277056697167609E-4
New Minimum: -83.76371841316815 > -83.76393732030591
WOLFE (weak): th(27.849533001676676)=-83.76393732030591; dx=-1.1289918962552462E-5 evalInputDelta=3.3167770473596647E-4
New Minimum: -83.76393732030591 > -83.7649356622712
WOLFE (weak): th(111.3981320067067)=-83.7649356622712; dx=-1.1285171783984333E-5 evalInputDelta=0.0013300196700214428
New Minimum: -83.7649356622712 > -83.77024889674325
WOLFE (weak): th(556.9906600335335)=-83.77024889674325; dx=-1.1283941447265717E-5 evalInputDelta=0.006643254142076671
New Minimum: -83.77024889674325 > -83.80346058331575
WOLFE (weak): th(3341.9439602012008)=-83.80346058331575; dx=-1.1219434335080465E-5 evalInputDelta=0.039854940714576514
New Minimum: -83.80346058331575 > -84.04197844727445
WOLFE (weak): th(23393.607721408407)=-84.04197844727445; dx=-1.1226655141766384E-5 evalInputDelta=0.27837280467326764
New Minimum: -84.04197844727445 > -85.94406435625729
WOLFE (weak): th(187148.86177126726)=-85.94406435625729; dx=-1.0752066134953459E-5 evalInputDelta=2.180458713656108
New Minimum: -85.94406435625729 > -99.35108385486255
END: th(1684339.7559414054)=-99.35108385486255; dx=-6.336108339979078E-6 evalInputDelta=15.587478212261374
Fitness changed from -83.76360564260118 to -99.35108385486255
Iteration 2 complete. Error: -99.35108385486255 Total: 32.9935; Orientation: 0.1054; Line Search: 29.5874
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/bc9c9f8f-ada4-49b4-9fa1-18866af94877.jpg)
Adding measurement 47254d51 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-99.35108385486255;dx=-6.814056785368775E-6
New Minimum: -99.35108385486255 > -115.88690478931206
END: th(3628800.0000000005)=-115.88690478931206; dx=-2.669471911390684E-6 evalInputDelta=16.535820934449504
Fitness changed from -99.35108385486255 to -115.88690478931206
Iteration 3 complete. Error: -115.88690478931206 Total: 9.7676; Orientation: 0.1059; Line Search: 6.0687
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/872296e6-9e0d-4e5a-94a2-b1a20be5ea53.jpg)
Adding measurement 2f9d3eee to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.100e+03, gradient 2.215e-03, dot -0.480; [8f24441b-ac06-4d07-9dbb-d49a6f62b08b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -115.88690478931206, -99.35108385486255, -83.76360564260118, -83.76357910832806
LBFGS Accumulation History: 3 points
Removed measurement 2f9d3eee to history. Total: 3
th(0)=-115.88690478931206;dx=-4.902885460826163E-6
New Minimum: -115.88690478931206 > -130.19099768892863
END: th(7818012.603187701)=-130.19099768892863; dx=-3.3118460748162464E-7 evalInputDelta=14.304092899616577
Fitness changed from -115.88690478931206 to -130.19099768892863
Iteration 4 complete. Error: -130.19099768892863 Total: 11.3098; Orientation: 1.8871; Line Search: 5.9760
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/9fdf8fc4-6ec3-491a-af84-212af518a253.jpg)
Adding measurement 3b9ffc48 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.404e+03, gradient 2.597e-03, dot -0.242; [8f24441b-ac06-4d07-9dbb-d49a6f62b08b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -130.19099768892863, -99.35108385486255, -83.76360564260118, -83.76357910832806
LBFGS Accumulation History: 3 points
Removed measurement 3b9ffc48 to history. Total: 3
th(0)=-130.19099768892863;dx=-6.726818953228155E-6
Armijo: th(1.6843397559414055E7)=-122.54208731559855; dx=1.7498345778636853E-6 evalInputDelta=-7.648910373330082
New Minimum: -130.19099768892863 > -141.01386250584412
WOLF (strong): th(8421698.779707028)=-141.01386250584412; dx=1.5947221613514102E-6 evalInputDelta=10.822864816915484
New Minimum: -141.01386250584412 > -143.50619300141733
END: th(2807232.926569009)=-143.50619300141733; dx=-2.3345614263563367E-6 evalInputDelta=13.315195312488697
Fitness changed from -130.19099768892863 to -143.50619300141733
Iteration 5 complete. Error: -143.50619300141733 Total: 17.5596; Orientation: 1.8105; Line Search: 12.3670
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/011faf1c-951f-4297-9db7-adbf3a7fdec1.jpg)
Adding measurement 3b0d3cd5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.993e+04, gradient 1.782e-03, dot -0.537; [8f24441b-ac06-4d07-9dbb-d49a6f62b08b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -143.50619300141733, -99.35108385486255, -83.76360564260118, -83.76357910832806
LBFGS Accumulation History: 3 points
Removed measurement 3b0d3cd5 to history. Total: 3
th(0)=-143.50619300141733;dx=-3.1673335954421513E-6
New Minimum: -143.50619300141733 > -154.59750089721794
END: th(6048000.000000001)=-154.59750089721794; dx=-8.324547375411739E-7 evalInputDelta=11.091307895800611
Fitness changed from -143.50619300141733 to -154.59750089721794
Iteration 6 complete. Error: -154.59750089721794 Total: 12.3876; Orientation: 2.0657; Line Search: 6.6420
Adding measurement cc95889 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.510e+04, gradient 1.945e-03, dot -0.455; [8f24441b-ac06-4d07-9dbb-d49a6f62b08b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -154.59750089721794, -99.35108385486255, -83.76360564260118, -83.76357910832806
LBFGS Accumulation History: 3 points
Removed measurement cc95889 to history. Total: 3
th(0)=-154.59750089721794;dx=-3.7743775584026133E-6
New Minimum: -154.59750089721794 > -157.03587932027148
WOLF (strong): th(1.3030021005312836E7)=-157.03587932027148; dx=9.072857399538252E-7 evalInputDelta=2.4383784230535355
New Minimum: -157.03587932027148 > -162.78108756600847
WOLF (strong): th(6515010.502656418)=-162.78108756600847; dx=2.485365074015115E-7 evalInputDelta=8.183586668790525
END: th(2171670.167552139)=-160.82749891720482; dx=-1.7884105481031176E-6 evalInputDelta=6.22999801998688
Fitness changed from -154.59750089721794 to -162.78108756600847
Iteration 7 complete. Error: -162.78108756600847 Total: 16.2164; Orientation: 1.7503; Line Search: 11.5194
Adding measurement 22198ff2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.830e+04, gradient 2.155e-03, dot -0.367; [8f24441b-ac06-4d07-9dbb-d49a6f62b08b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -162.78108756600847, -99.35108385486255, -83.76360564260118, -83.76357910832806
LBFGS Accumulation History: 3 points
Removed measurement 22198ff2 to history. Total: 3
th(0)=-162.78108756600847;dx=-4.641016696064736E-6
New Minimum: -162.78108756600847 > -173.72259640019573
END: th(4678721.544281682)=-173.72259640019573; dx=-5.0577610899188365E-8 evalInputDelta=10.94150883418726
Fitness changed from -162.78108756600847 to -173.72259640019573
Iteration 8 complete. Error: -173.72259640019573 Total: 10.6017; Orientation: 1.9941; Line Search: 5.9424
Adding measurement 60a0c436 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.741e+04, gradient 1.734e-03, dot -0.487; [8f24441b-ac06-4d07-9dbb-d49a6f62b08b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -173.72259640019573, -99.35108385486255, -83.76360564260118, -83.76357910832806
LBFGS Accumulation History: 3 points
Removed measurement 60a0c436 to history. Total: 3
th(0)=-173.72259640019573;dx=-3.0024486449374047E-6
New Minimum: -173.72259640019573 > -178.65987813102083
WOLF (strong): th(1.0080000000000002E7)=-178.65987813102083; dx=7.432422170466904E-7 evalInputDelta=4.937281730825106
New Minimum: -178.65987813102083 > -181.2351722533734
END: th(5040000.000000001)=-181.2351722533734; dx=-2.409904906254534E-7 evalInputDelta=7.51257585317768
Fitness changed from -173.72259640019573 to -181.2351722533734
Iteration 9 complete. Error: -181.2351722533734 Total: 14.1752; Orientation: 1.8584; Line Search: 9.2093
Adding measurement 2385cc18 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.249e+04, gradient 1.699e-03, dot -0.487; [8f24441b-ac06-4d07-9dbb-d49a6f62b08b = 1.000/1.000e+00]
Orientation rejected. Popping history element from -181.2351722533734, -99.35108385486255, -83.76360564260118, -83.76357910832806
LBFGS Accumulation History: 3 points
Removed measurement 2385cc18 to history. Total: 3
th(0)=-181.2351722533734;dx=-2.869808757039939E-6
New Minimum: -181.2351722533734 > -184.40631799049163
WOLF (strong): th(1.0858350837760696E7)=-184.40631799049163; dx=8.250126269778078E-7 evalInputDelta=3.1711457371182235
New Minimum: -184.40631799049163 > -188.12134439230175
WOLF (strong): th(5429175.418880348)=-188.12134439230175; dx=1.210456525752683E-8 evalInputDelta=6.886172138928345
END: th(1809725.1396267826)=-185.56200986731193; dx=-1.7157819159444467E-6 evalInputDelta=4.3268376139385225
Fitness changed from -181.2351722533734 to -188.12134439230175
Iteration 10 complete. Error: -188.12134439230175 Total: 17.1058; Orientation: 1.9173; Line Search: 12.0972
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/2463c2ac-0734-41a8-96f4-1a8cf4eb3c1a.jpg)
Final threshold in iteration 11: -188.12134439230175 (> -Infinity) after 157.199s (< 5400.000s)
Returns
-188.12134439230175