BasicOptimizer.scala:89 executed in 212.68 seconds (3.311 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: 687033175501200
Reset training subject: 687037726938900
Adding measurement 6b1d0846 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-761.3602957864299;dx=-0.010915879211222092
New Minimum: -761.3602957864299 > -761.3847581873438
WOLFE (weak): th(2.154434690031884)=-761.3847581873438; dx=-0.010457592750056952 evalInputDelta=0.02446240091387608
New Minimum: -761.3847581873438 > -761.4091787600147
WOLFE (weak): th(4.308869380063768)=-761.4091787600147; dx=-0.010460270219233861 evalInputDelta=0.048882973584795764
New Minimum: -761.4091787600147 > -761.5068532193259
WOLFE (weak): th(12.926608140191302)=-761.5068532193259; dx=-0.010458928856331342 evalInputDelta=0.14655743289597467
New Minimum: -761.5068532193259 > -761.9465204330288
WOLFE (weak): th(51.70643256076521)=-761.9465204330288; dx=-0.010456927829744035 evalInputDelta=0.5862246465989074
New Minimum: -761.9465204330288 > -764.2879856441549
WOLFE (weak): th(258.53216280382605)=-764.2879856441549; dx=-0.010425407600076726 evalInputDelta=2.9276898577249995
New Minimum: -764.2879856441549 > -778.7878401721485
WOLFE (weak): th(1551.1929768229563)=-778.7878401721485; dx=-0.010260958775636202 evalInputDelta=17.427544385718647
New Minimum: -778.7878401721485 > -874.6347094644713
END: th(10858.350837760694)=-874.6347094644713; dx=-0.008642122256471636 evalInputDelta=113.27441367804136
Fitness changed from -761.3602957864299 to -874.6347094644713
Iteration 1 complete. Error: -874.6347094644713 Total: 50.2191; Orientation: 0.0959; Line Search: 36.6737
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/51ccf163-c765-4ad8-a058-6a1d95e64355.jpg)
Adding measurement 465eda78 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-874.6347094644713;dx=-0.007913819973173915
New Minimum: -874.6347094644713 > -1042.2467917916563
END: th(23393.607721408407)=-1042.2467917916563; dx=-0.005275676598229513 evalInputDelta=167.61208232718502
Fitness changed from -874.6347094644713 to -1042.2467917916563
Iteration 2 complete. Error: -1042.2467917916563 Total: 15.1919; Orientation: 0.1679; Line Search: 9.4555
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ef3e0fec-03de-406e-b39d-9b9015e419dd.jpg)
Adding measurement 4f13a9b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1042.2467917916563;dx=-0.004824133666990321
New Minimum: -1042.2467917916563 > -1249.9614994070816
END: th(50400.00000000001)=-1249.9614994070816; dx=-0.0028631583280918542 evalInputDelta=207.71470761542537
Fitness changed from -1042.2467917916563 to -1249.9614994070816
Iteration 3 complete. Error: -1249.9614994070816 Total: 14.5339; Orientation: 0.1041; Line Search: 9.0558
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/ab1a865f-1cf2-4d19-855c-21dbbb6b4771.jpg)
Adding measurement 32fda49c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.042e+04, gradient 5.661e-02, dot -0.788; [67c6ee25-3742-443f-ba91-18427ae48f92 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1249.9614994070816, -1042.2467917916563, -874.6347094644713, -761.3602957864299
LBFGS Accumulation History: 3 points
Removed measurement 32fda49c to history. Total: 3
th(0)=-1249.9614994070816;dx=-0.0032036954963866873
New Minimum: -1249.9614994070816 > -1496.105444144897
END: th(108583.50837760697)=-1496.105444144897; dx=-0.001317478268359862 evalInputDelta=246.14394473781545
Fitness changed from -1249.9614994070816 to -1496.105444144897
Iteration 4 complete. Error: -1496.105444144897 Total: 16.4377; Orientation: 1.7280; Line Search: 9.1284
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/85aad9d1-e3b7-46c2-ae2b-fd4cff1f64c4.jpg)
Adding measurement 2e007d91 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.133e+04, gradient 5.636e-02, dot -0.557; [67c6ee25-3742-443f-ba91-18427ae48f92 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1496.105444144897, -1042.2467917916563, -874.6347094644713, -761.3602957864299
LBFGS Accumulation History: 3 points
Removed measurement 2e007d91 to history. Total: 3
th(0)=-1496.105444144897;dx=-0.003173378864188967
New Minimum: -1496.105444144897 > -1678.6819234149154
END: th(233936.07721408413)=-1678.6819234149154; dx=-3.673664726566857E-5 evalInputDelta=182.57647927001835
Fitness changed from -1496.105444144897 to -1678.6819234149154
Iteration 5 complete. Error: -1678.6819234149154 Total: 15.9956; Orientation: 1.6712; Line Search: 9.0998
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/0572c604-5a3e-4a3f-9e95-82a4855cfc89.jpg)
Adding measurement 1ff306ee to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.646e+03, gradient 6.552e-02, dot -0.310; [67c6ee25-3742-443f-ba91-18427ae48f92 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1678.6819234149154, -1042.2467917916563, -874.6347094644713, -761.3602957864299
LBFGS Accumulation History: 3 points
Removed measurement 1ff306ee to history. Total: 3
th(0)=-1678.6819234149154;dx=-0.0042855100686381795
Armijo: th(504000.0000000002)=-1489.2107809171944; dx=8.488246943992024E-4 evalInputDelta=-189.47114249772108
New Minimum: -1678.6819234149154 > -1784.0037836282747
WOLF (strong): th(252000.0000000001)=-1784.0037836282747; dx=0.0010743632102238195 evalInputDelta=105.32186021335929
New Minimum: -1784.0037836282747 > -1899.1057764116247
END: th(84000.00000000003)=-1899.1057764116247; dx=-7.563894234588738E-4 evalInputDelta=220.42385299670923
Fitness changed from -1678.6819234149154 to -1899.1057764116247
Iteration 6 complete. Error: -1899.1057764116247 Total: 24.9824; Orientation: 1.5816; Line Search: 17.9298
Adding measurement 306e9eaf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.518e+04, gradient 5.132e-02, dot -0.403; [67c6ee25-3742-443f-ba91-18427ae48f92 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1899.1057764116247, -1042.2467917916563, -874.6347094644713, -761.3602957864299
LBFGS Accumulation History: 3 points
Removed measurement 306e9eaf to history. Total: 3
th(0)=-1899.1057764116247;dx=-0.0026336064055571
New Minimum: -1899.1057764116247 > -2048.670056402446
WOLF (strong): th(180972.5139626783)=-2048.670056402446; dx=2.8241905450618213E-4 evalInputDelta=149.5642799908212
END: th(90486.25698133915)=-2045.221381660186; dx=-6.317980783747712E-4 evalInputDelta=146.11560524856122
Fitness changed from -1899.1057764116247 to -2048.670056402446
Iteration 7 complete. Error: -2048.670056402446 Total: 20.0629; Orientation: 1.6499; Line Search: 14.0426
Adding measurement 6f97a323 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.854e+04, gradient 6.711e-02, dot -0.307; [67c6ee25-3742-443f-ba91-18427ae48f92 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2048.670056402446, -1042.2467917916563, -874.6347094644713, -761.3602957864299
LBFGS Accumulation History: 3 points
Removed measurement 6f97a323 to history. Total: 3
th(0)=-2048.670056402446;dx=-0.004502336345286167
New Minimum: -2048.670056402446 > -2089.967703099739
WOLF (strong): th(194946.7310117368)=-2089.967703099739; dx=0.0016303961170578748 evalInputDelta=41.2976466972932
New Minimum: -2089.967703099739 > -2229.2144356252497
WOLF (strong): th(97473.3655058684)=-2229.2144356252497; dx=4.093741198819136E-4 evalInputDelta=180.54437922280385
END: th(32491.121835289465)=-2172.726512932541; dx=-0.0025277085853589063 evalInputDelta=124.05645653009515
Fitness changed from -2048.670056402446 to -2229.2144356252497
Iteration 8 complete. Error: -2229.2144356252497 Total: 24.1865; Orientation: 1.6115; Line Search: 18.1534
Adding measurement 2cd3ad44 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.423e+04, gradient 5.393e-02, dot -0.379; [67c6ee25-3742-443f-ba91-18427ae48f92 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2229.2144356252497, -1042.2467917916563, -874.6347094644713, -761.3602957864299
LBFGS Accumulation History: 3 points
Removed measurement 2cd3ad44 to history. Total: 3
th(0)=-2229.2144356252497;dx=-0.002903152553569887
New Minimum: -2229.2144356252497 > -2351.8573511163468
END: th(70000.00000000003)=-2351.8573511163468; dx=-5.285247274214261E-4 evalInputDelta=122.64291549109703
Fitness changed from -2229.2144356252497 to -2351.8573511163468
Iteration 9 complete. Error: -2351.8573511163468 Total: 15.0050; Orientation: 1.6037; Line Search: 9.1165
Adding measurement 6e221f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.102e+04, gradient 4.182e-02, dot -0.506; [67c6ee25-3742-443f-ba91-18427ae48f92 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2351.8573511163468, -1042.2467917916563, -874.6347094644713, -761.3602957864299
LBFGS Accumulation History: 3 points
Removed measurement 6e221f to history. Total: 3
th(0)=-2351.8573511163468;dx=-0.0017473951500730997
New Minimum: -2351.8573511163468 > -2455.5935127785297
END: th(150810.42830223194)=-2455.5935127785297; dx=-2.4192337156147776E-5 evalInputDelta=103.7361616621829
Fitness changed from -2351.8573511163468 to -2455.5935127785297
Iteration 10 complete. Error: -2455.5935127785297 Total: 15.0686; Orientation: 1.5884; Line Search: 8.9951
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/af7afbcf-6dd4-4bff-b508-fcaf2849b828.jpg)
Final threshold in iteration 11: -2455.5935127785297 (> -Infinity) after 212.685s (< 5400.000s)
Returns
-2455.5935127785297