BasicOptimizer.scala:88 executed in 826.81 seconds (3.294 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: 1394662736028
Reset training subject: 1412542393409
Adding measurement 605a8971 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=6.939473047852516;dx=-4.211608028768243E-7
New Minimum: 6.939473047852516 > 6.939469590783119
WOLFE (weak): th(2.154434690031884)=6.939469590783119; dx=-4.2157171942412244E-7 evalInputDelta=3.4570693969726562E-6
New Minimum: 6.939469590783119 > 6.939466148614883
WOLFE (weak): th(4.308869380063768)=6.939466148614883; dx=-4.1243325740459217E-7 evalInputDelta=6.899237632751465E-6
New Minimum: 6.939466148614883 > 6.93945175409317
WOLFE (weak): th(12.926608140191302)=6.93945175409317; dx=-4.220775328988146E-7 evalInputDelta=2.12937593460083E-5
New Minimum: 6.93945175409317 > 6.939387500286102
WOLFE (weak): th(51.70643256076521)=6.939387500286102; dx=-4.2130816551470547E-7 evalInputDelta=8.55475664138794E-5
New Minimum: 6.939387500286102 > 6.9390445947647095
WOLFE (weak): th(258.53216280382605)=6.9390445947647095; dx=-4.205883617134965E-7 evalInputDelta=4.2845308780670166E-4
New Minimum: 6.9390445947647095 > 6.936903208494186
WOLFE (weak): th(1551.1929768229563)=6.936903208494186; dx=-4.2182325345750393E-7 evalInputDelta=0.002569839358329773
New Minimum: 6.936903208494186 > 6.921495392918587
WOLFE (weak): th(10858.350837760694)=6.921495392918587; dx=-4.198343037831877E-7 evalInputDelta=0.017977654933929443
New Minimum: 6.921495392918587 > 6.797144487500191
WOLFE (weak): th(86866.80670208555)=6.797144487500191; dx=-4.087628622642276E-7 evalInputDelta=0.14232856035232544
New Minimum: 6.797144487500191 > 5.7905175387859344
END: th(781801.26031877)=5.7905175387859344; dx=-2.90313406985159E-7 evalInputDelta=1.1489555090665817
Fitness changed from 6.939473047852516 to 5.7905175387859344
Iteration 1 complete. Error: 5.7905175387859344 Total: 237.3660; Orientation: 0.0130; Line Search: 183.8206
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3647a60e-99dd-40f1-9de7-b5c4ee3e9584.jpg)
Adding measurement 2372103f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=5.7905175387859344;dx=-2.699911805004043E-7
New Minimum: 5.7905175387859344 > 4.284160703420639
END: th(1684339.7559414052)=4.284160703420639; dx=-1.780000235726083E-7 evalInputDelta=1.5063568353652954
Fitness changed from 5.7905175387859344 to 4.284160703420639
Iteration 2 complete. Error: 4.284160703420639 Total: 55.0660; Orientation: 0.0104; Line Search: 36.6656
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/8e3f736e-6f44-4885-81ca-0476ca3a4ac1.jpg)
Adding measurement 4815f022 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=4.284160703420639;dx=-1.871867290296109E-7
New Minimum: 4.284160703420639 > 2.5250244438648224
END: th(3628800.0)=2.5250244438648224; dx=-1.0693439999168006E-7 evalInputDelta=1.7591362595558167
Fitness changed from 4.284160703420639 to 2.5250244438648224
Iteration 3 complete. Error: 2.5250244438648224 Total: 55.0427; Orientation: 0.0108; Line Search: 36.5709
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/6079f808-d304-49ea-935d-63b684c1aa42.jpg)
Adding measurement 6f7d585c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.914e+03, gradient 3.473e-04, dot -0.755; [d5335e68-238f-4bde-bcd9-6ee799e62ddd = 1.000/1.000e+00]
Orientation rejected. Popping history element from 2.5250244438648224, 4.284160703420639, 5.7905175387859344, 6.939473047852516
LBFGS Accumulation History: 3 points
Removed measurement 6f7d585c to history. Total: 3
th(0)=2.5250244438648224;dx=-1.1770946023422201E-7
New Minimum: 2.5250244438648224 > 0.8934213668107986
END: th(7818012.6031877)=0.8934213668107986; dx=-5.255119044260499E-8 evalInputDelta=1.6316030770540237
Fitness changed from 2.5250244438648224 to 0.8934213668107986
Iteration 4 complete. Error: 0.8934213668107986 Total: 55.3021; Orientation: 0.2791; Line Search: 36.2387
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b4213819-0817-4718-b0e7-2ce251f82b67.jpg)
Adding measurement 34847829 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.290e+03, gradient 2.927e-04, dot -0.568; [d5335e68-238f-4bde-bcd9-6ee799e62ddd = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.8934213668107986, 4.284160703420639, 5.7905175387859344, 6.939473047852516
LBFGS Accumulation History: 3 points
Removed measurement 34847829 to history. Total: 3
th(0)=0.8934213668107986;dx=-8.293628703236973E-8
New Minimum: 0.8934213668107986 > -0.19506019353866577
END: th(1.684339755941405E7)=-0.19506019353866577; dx=-1.2700991570083673E-8 evalInputDelta=1.0884815603494644
Fitness changed from 0.8934213668107986 to -0.19506019353866577
Iteration 5 complete. Error: -0.19506019353866577 Total: 55.9267; Orientation: 0.2815; Line Search: 36.9530
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/7faf25f4-a637-4117-af24-7f84a55167cf.jpg)
Adding measurement 7cc2a94a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.887e+03, gradient 2.543e-04, dot -0.351; [d5335e68-238f-4bde-bcd9-6ee799e62ddd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.19506019353866577, 4.284160703420639, 5.7905175387859344, 6.939473047852516
LBFGS Accumulation History: 3 points
Removed measurement 7cc2a94a to history. Total: 3
th(0)=-0.19506019353866577;dx=-6.27690739696681E-8
Armijo: th(3.6288E7)=0.13148707151412964; dx=1.07426820933336E-8 evalInputDelta=-0.3265472650527954
New Minimum: -0.19506019353866577 > -0.8767358511686325
END: th(1.8144E7)=-0.8767358511686325; dx=-3.123318192593081E-10 evalInputDelta=0.6816756576299667
Fitness changed from -0.19506019353866577 to -0.8767358511686325
Iteration 6 complete. Error: -0.8767358511686325 Total: 74.0944; Orientation: 0.2840; Line Search: 55.3987
Adding measurement 5e43ab9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.817e+03, gradient 2.396e-04, dot -0.264; [d5335e68-238f-4bde-bcd9-6ee799e62ddd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.8767358511686325, 4.284160703420639, 5.7905175387859344, 6.939473047852516
LBFGS Accumulation History: 3 points
Removed measurement 5e43ab9 to history. Total: 3
th(0)=-0.8767358511686325;dx=-5.4241391735736945E-8
Armijo: th(3.90900630159385E7)=0.3446623831987381; dx=1.2155780157989407E-8 evalInputDelta=-1.2213982343673706
New Minimum: -0.8767358511686325 > -1.0880573466420174
WOLF (strong): th(1.954503150796925E7)=-1.0880573466420174; dx=6.432310332514824E-9 evalInputDelta=0.21132149547338486
New Minimum: -1.0880573466420174 > -1.5243507474660873
END: th(6515010.502656416)=-1.5243507474660873; dx=-1.4123707151816773E-8 evalInputDelta=0.6476148962974548
Fitness changed from -0.8767358511686325 to -1.5243507474660873
Iteration 7 complete. Error: -1.5243507474660873 Total: 91.4290; Orientation: 0.2805; Line Search: 72.7236
Adding measurement 78b9ebdc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.141e+03, gradient 1.670e-04, dot -0.322; [d5335e68-238f-4bde-bcd9-6ee799e62ddd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5243507474660873, 4.284160703420639, 5.7905175387859344, 6.939473047852516
LBFGS Accumulation History: 3 points
Removed measurement 78b9ebdc to history. Total: 3
th(0)=-1.5243507474660873;dx=-2.6600749869678003E-8
New Minimum: -1.5243507474660873 > -1.7367187291383743
END: th(1.4036164632845044E7)=-1.7367187291383743; dx=-4.420967197495757E-9 evalInputDelta=0.212367981672287
Fitness changed from -1.5243507474660873 to -1.7367187291383743
Iteration 8 complete. Error: -1.7367187291383743 Total: 55.5131; Orientation: 0.2835; Line Search: 36.9703
Adding measurement 7393d73a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.259e+03, gradient 1.983e-04, dot -0.280; [d5335e68-238f-4bde-bcd9-6ee799e62ddd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7367187291383743, 4.284160703420639, 5.7905175387859344, 6.939473047852516
LBFGS Accumulation History: 3 points
Removed measurement 7393d73a to history. Total: 3
th(0)=-1.7367187291383743;dx=-3.7048498708955276E-8
Armijo: th(3.0240000000000004E7)=-0.47996023297309875; dx=9.794302603580266E-9 evalInputDelta=-1.2567584961652756
Armijo: th(1.5120000000000002E7)=-1.6362501978874207; dx=8.072483554595841E-9 evalInputDelta=-0.10046853125095367
New Minimum: -1.7367187291383743 > -2.097869262099266
END: th(5040000.000000001)=-2.097869262099266; dx=-8.761365549639744E-9 evalInputDelta=0.3611505329608917
Fitness changed from -1.7367187291383743 to -2.097869262099266
Iteration 9 complete. Error: -2.097869262099266 Total: 91.6690; Orientation: 0.2763; Line Search: 72.9248
Adding measurement 1714ca91 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.300e+03, gradient 1.319e-04, dot -0.356; [d5335e68-238f-4bde-bcd9-6ee799e62ddd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.097869262099266, 4.284160703420639, 5.7905175387859344, 6.939473047852516
LBFGS Accumulation History: 3 points
Removed measurement 1714ca91 to history. Total: 3
th(0)=-2.097869262099266;dx=-1.6698546494409363E-8
New Minimum: -2.097869262099266 > -2.255664072930813
END: th(1.0858350837760696E7)=-2.255664072930813; dx=-6.50063941878115E-9 evalInputDelta=0.15779481083154678
Fitness changed from -2.097869262099266 to -2.255664072930813
Iteration 10 complete. Error: -2.255664072930813 Total: 55.2377; Orientation: 0.2851; Line Search: 37.1744
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b63b7c83-e740-4481-ad8c-eac83fb714ab.jpg)
Final threshold in iteration 11: -2.255664072930813 (> -Infinity) after 826.808s (< 5400.000s)
Returns
-2.255664072930813