BasicOptimizer.scala:89 executed in 60.57 seconds (2.465 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: 146490073881600
Reset training subject: 146490977450500
Adding measurement 5e8887d3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-82.96947680943427;dx=-0.250934039597556
New Minimum: -82.96947680943427 > -83.64631524871552
WOLFE (weak): th(2.154434690031884)=-83.64631524871552; dx=-0.25285562410467705 evalInputDelta=0.676838439281255
New Minimum: -83.64631524871552 > -84.32610272959673
WOLFE (weak): th(4.308869380063768)=-84.32610272959673; dx=-0.25379945457523384 evalInputDelta=1.3566259201624575
New Minimum: -84.32610272959673 > -87.08164216609462
WOLFE (weak): th(12.926608140191302)=-87.08164216609462; dx=-0.2587854679381041 evalInputDelta=4.1121653566603555
New Minimum: -87.08164216609462 > -100.15255940938304
WOLFE (weak): th(51.70643256076521)=-100.15255940938304; dx=-0.2744036155135303 evalInputDelta=17.183082599948776
New Minimum: -100.15255940938304 > -172.9837307198281
WOLFE (weak): th(258.53216280382605)=-172.9837307198281; dx=-0.24989534766236937 evalInputDelta=90.01425391039382
New Minimum: -172.9837307198281 > -330.8191537683391
END: th(1551.1929768229563)=-330.8191537683391; dx=-0.020639079513628977 evalInputDelta=247.84967695890484
Fitness changed from -82.96947680943427 to -330.8191537683391
Iteration 1 complete. Error: -330.8191537683391 Total: 11.3109; Orientation: 0.0159; Line Search: 8.7332
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/34e2c576-12d7-47d7-b3a1-6d2e6efca7a2.jpg)
Adding measurement 6cbffa54 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-330.8191537683391;dx=-0.3304659385494769
New Minimum: -330.8191537683391 > -453.30282717516775
WOLF (strong): th(3341.943960201201)=-453.30282717516775; dx=0.0303361063226959 evalInputDelta=122.48367340682864
New Minimum: -453.30282717516775 > -556.5612893024451
WOLF (strong): th(1670.9719801006006)=-556.5612893024451; dx=0.0018960008817025208 evalInputDelta=225.74213553410596
END: th(556.9906600335336)=-504.16485709041643; dx=-0.12553920599962962 evalInputDelta=173.34570332207733
Fitness changed from -330.8191537683391 to -556.5612893024451
Iteration 2 complete. Error: -556.5612893024451 Total: 4.4531; Orientation: 0.0149; Line Search: 3.5287
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b8237c6c-fc7b-48e4-b7bd-5e12955ef254.jpg)
Adding measurement 6ad8e2d2 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-556.5612893024451;dx=-0.22281948774006544
New Minimum: -556.5612893024451 > -756.4301025210459
END: th(1200.0000000000002)=-756.4301025210459; dx=-0.04795154597669748 evalInputDelta=199.86881321860085
Fitness changed from -556.5612893024451 to -756.4301025210459
Iteration 3 complete. Error: -756.4301025210459 Total: 2.6860; Orientation: 0.0147; Line Search: 1.7828
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/2213b78c-1e84-472d-a385-3260c31c1f27.jpg)
Adding measurement 6787083f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.141e+03, gradient 3.313e-01, dot -0.540; [793bea19-a36d-4802-a573-fc27da64238a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -756.4301025210459, -556.5612893024451, -330.8191537683391, -82.96947680943427
LBFGS Accumulation History: 3 points
Removed measurement 6787083f to history. Total: 3
th(0)=-756.4301025210459;dx=-0.1095547621397118
New Minimum: -756.4301025210459 > -910.0262702252062
END: th(2585.321628038261)=-910.0262702252062; dx=-0.011372085838746136 evalInputDelta=153.59616770416028
Fitness changed from -756.4301025210459 to -910.0262702252062
Iteration 4 complete. Error: -910.0262702252062 Total: 2.9283; Orientation: 0.2734; Line Search: 1.7187
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/899a87bd-534e-4842-92b8-052a8a9f23a4.jpg)
Adding measurement 2b23b8a9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.201e+03, gradient 4.093e-01, dot -0.442; [793bea19-a36d-4802-a573-fc27da64238a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -910.0262702252062, -556.5612893024451, -330.8191537683391, -82.96947680943427
LBFGS Accumulation History: 3 points
Removed measurement 2b23b8a9 to history. Total: 3
th(0)=-910.0262702252062;dx=-0.16729164465659052
New Minimum: -910.0262702252062 > -917.1458444544139
WOLF (strong): th(5569.906600335336)=-917.1458444544139; dx=0.011364100630305999 evalInputDelta=7.119574229207728
New Minimum: -917.1458444544139 > -1015.5582824240074
WOLF (strong): th(2784.953300167668)=-1015.5582824240074; dx=0.012723645480583693 evalInputDelta=105.53201219880123
New Minimum: -1015.5582824240074 > -1037.1889895289094
END: th(928.317766722556)=-1037.1889895289094; dx=-0.043635052422385315 evalInputDelta=127.16271930370317
Fitness changed from -910.0262702252062 to -1037.1889895289094
Iteration 5 complete. Error: -1037.1889895289094 Total: 4.6305; Orientation: 0.3065; Line Search: 3.3978
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/c9aebe56-9b22-4ade-ae89-437db3d759eb.jpg)
Adding measurement 325538fb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.493e+03, gradient 2.638e-01, dot -0.589; [793bea19-a36d-4802-a573-fc27da64238a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1037.1889895289094, -556.5612893024451, -330.8191537683391, -82.96947680943427
LBFGS Accumulation History: 3 points
Removed measurement 325538fb to history. Total: 3
th(0)=-1037.1889895289094;dx=-0.06949017564205665
New Minimum: -1037.1889895289094 > -1150.184278713633
END: th(2000.0000000000007)=-1150.184278713633; dx=-0.03307797542164424 evalInputDelta=112.99528918472356
Fitness changed from -1037.1889895289094 to -1150.184278713633
Iteration 6 complete. Error: -1150.184278713633 Total: 3.2467; Orientation: 0.3051; Line Search: 1.9645
Adding measurement 23c4fa6c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.158e+03, gradient 2.830e-01, dot -0.594; [793bea19-a36d-4802-a573-fc27da64238a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1150.184278713633, -556.5612893024451, -330.8191537683391, -82.96947680943427
LBFGS Accumulation History: 3 points
Removed measurement 23c4fa6c to history. Total: 3
th(0)=-1150.184278713633;dx=-0.07998973161869222
New Minimum: -1150.184278713633 > -1255.382362071413
END: th(4308.869380063769)=-1255.382362071413; dx=-0.008615130160999044 evalInputDelta=105.19808335777998
Fitness changed from -1150.184278713633 to -1255.382362071413
Iteration 7 complete. Error: -1255.382362071413 Total: 2.8190; Orientation: 0.2736; Line Search: 1.7180
Adding measurement 1e86c267 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.970e+03, gradient 3.501e-01, dot -0.396; [793bea19-a36d-4802-a573-fc27da64238a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1255.382362071413, -556.5612893024451, -330.8191537683391, -82.96947680943427
LBFGS Accumulation History: 3 points
Removed measurement 1e86c267 to history. Total: 3
th(0)=-1255.382362071413;dx=-0.12147862629656268
Armijo: th(9283.177667225562)=-941.8179229553874; dx=0.028667944408459232 evalInputDelta=-313.5644391160255
New Minimum: -1255.382362071413 > -1322.1761890913026
WOLF (strong): th(4641.588833612781)=-1322.1761890913026; dx=0.04099387044673853 evalInputDelta=66.7938270198897
New Minimum: -1322.1761890913026 > -1430.2723079889367
END: th(1547.196277870927)=-1430.2723079889367; dx=-0.04428299256063061 evalInputDelta=174.88994591752385
Fitness changed from -1255.382362071413 to -1430.2723079889367
Iteration 8 complete. Error: -1430.2723079889367 Total: 4.5209; Orientation: 0.2801; Line Search: 3.4082
Adding measurement 48464534 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.045e+03, gradient 2.424e-01, dot -0.594; [793bea19-a36d-4802-a573-fc27da64238a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1430.2723079889367, -556.5612893024451, -330.8191537683391, -82.96947680943427
LBFGS Accumulation History: 3 points
Removed measurement 48464534 to history. Total: 3
th(0)=-1430.2723079889367;dx=-0.05805652004462431
New Minimum: -1430.2723079889367 > -1577.9889891884543
END: th(3333.333333333335)=-1577.9889891884543; dx=-0.024675723182501226 evalInputDelta=147.71668119951755
Fitness changed from -1430.2723079889367 to -1577.9889891884543
Iteration 9 complete. Error: -1577.9889891884543 Total: 3.0337; Orientation: 0.2970; Line Search: 1.7259
Adding measurement 12ee9827 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.004e+04, gradient 2.613e-01, dot -0.597; [793bea19-a36d-4802-a573-fc27da64238a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1577.9889891884543, -556.5612893024451, -330.8191537683391, -82.96947680943427
LBFGS Accumulation History: 3 points
Removed measurement 12ee9827 to history. Total: 3
th(0)=-1577.9889891884543;dx=-0.06798045283286594
New Minimum: -1577.9889891884543 > -1668.7738013283886
END: th(7181.4489667729495)=-1668.7738013283886; dx=-0.0021021086664792486 evalInputDelta=90.78481213993427
Fitness changed from -1577.9889891884543 to -1668.7738013283886
Iteration 10 complete. Error: -1668.7738013283886 Total: 2.7963; Orientation: 0.2886; Line Search: 1.7272
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/96c7aa1c-8aff-4a6a-830f-7f2db421c524.jpg)
Adding measurement 59fb5c0b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.019e+04, gradient 3.709e-01, dot -0.367; [793bea19-a36d-4802-a573-fc27da64238a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1668.7738013283886, -556.5612893024451, -330.8191537683391, -82.96947680943427
LBFGS Accumulation History: 3 points
Removed measurement 59fb5c0b to history. Total: 3
th(0)=-1668.7738013283886;dx=-0.1374111753362452
Armijo: th(15471.962778709272)=-1190.5347013002183; dx=0.020126780670279114 evalInputDelta=-478.23910002817024
New Minimum: -1668.7738013283886 > -1719.9838662034012
WOLF (strong): th(7735.981389354636)=-1719.9838662034012; dx=0.04185360285491416 evalInputDelta=51.21006487501268
New Minimum: -1719.9838662034012 > -1964.5687185741301
END: th(2578.660463118212)=-1964.5687185741301; dx=-0.03276912091527329 evalInputDelta=295.79491724574154
Fitness changed from -1668.7738013283886 to -1964.5687185741301
Iteration 11 complete. Error: -1964.5687185741301 Total: 4.8409; Orientation: 0.2706; Line Search: 3.6439
Adding measurement 1d949611 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.006e+04, gradient 2.526e-01, dot -0.594; [793bea19-a36d-4802-a573-fc27da64238a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1964.5687185741301, -556.5612893024451, -330.8191537683391, -82.96947680943427
LBFGS Accumulation History: 3 points
Removed measurement 1d949611 to history. Total: 3
th(0)=-1964.5687185741301;dx=-0.06365300933510318
New Minimum: -1964.5687185741301 > -2141.32085405247
END: th(5555.555555555559)=-2141.32085405247; dx=-0.009045216934010442 evalInputDelta=176.75213547834005
Fitness changed from -1964.5687185741301 to -2141.32085405247
Iteration 12 complete. Error: -2141.32085405247 Total: 2.8293; Orientation: 0.2663; Line Search: 1.7112
Adding measurement 3659af to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.736e+04, gradient 3.336e-01, dot -0.488; [793bea19-a36d-4802-a573-fc27da64238a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2141.32085405247, -556.5612893024451, -330.8191537683391, -82.96947680943427
LBFGS Accumulation History: 3 points
Removed measurement 3659af to history. Total: 3
th(0)=-2141.32085405247;dx=-0.11065038253696732
Armijo: th(11969.081611288251)=-2033.4254350725525; dx=0.011055244389723249 evalInputDelta=-107.89541897991762
New Minimum: -2141.32085405247 > -2244.1630956773174
WOLF (strong): th(5984.540805644126)=-2244.1630956773174; dx=0.016036405612943623 evalInputDelta=102.84224162484725
New Minimum: -2244.1630956773174 > -2316.4987589031857
END: th(1994.8469352147085)=-2316.4987589031857; dx=-0.03115532736634101 evalInputDelta=175.17790485071555
Fitness changed from -2141.32085405247 to -2316.4987589031857
Iteration 13 complete. Error: -2316.4987589031857 Total: 4.6149; Orientation: 0.2778; Line Search: 3.4869
Adding measurement 4fca98aa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.384e+04, gradient 2.243e-01, dot -0.725; [793bea19-a36d-4802-a573-fc27da64238a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2316.4987589031857, -556.5612893024451, -330.8191537683391, -82.96947680943427
LBFGS Accumulation History: 3 points
Removed measurement 4fca98aa to history. Total: 3
th(0)=-2316.4987589031857;dx=-0.05020339261467119
New Minimum: -2316.4987589031857 > -2482.817854777108
END: th(4297.767438530354)=-2482.817854777108; dx=-0.03038065430550895 evalInputDelta=166.31909587392238
Fitness changed from -2316.4987589031857 to -2482.817854777108
Iteration 14 complete. Error: -2482.817854777108 Total: 2.9242; Orientation: 0.2809; Line Search: 1.8240
Adding measurement 4c4e6b97 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.050e+05, gradient 2.421e-01, dot -0.705; [793bea19-a36d-4802-a573-fc27da64238a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2482.817854777108, -556.5612893024451, -330.8191537683391, -82.96947680943427
LBFGS Accumulation History: 3 points
Removed measurement 4c4e6b97 to history. Total: 3
th(0)=-2482.817854777108;dx=-0.058529799224946194
New Minimum: -2482.817854777108 > -2677.964992302924
END: th(9259.259259259268)=-2677.964992302924; dx=-0.011671545663696744 evalInputDelta=195.1471375258161
Fitness changed from -2482.817854777108 to -2677.964992302924
Iteration 15 complete. Error: -2677.964992302924 Total: 2.8324; Orientation: 0.2688; Line Search: 1.6980
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/fdb87542-fed0-4d32-a199-2607e4e2be27.jpg)
Final threshold in iteration 16: -2677.964992302924 (> -Infinity) after 60.574s (< 5400.000s)
Returns
-2677.964992302924