BasicOptimizer.scala:89 executed in 43.94 seconds (0.768 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: 216578381829000
Reset training subject: 216578991435700
Adding measurement 609b412c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-56.800943442312324;dx=-0.01615934663148276
New Minimum: -56.800943442312324 > -56.83417919571014
WOLFE (weak): th(2.154434690031884)=-56.83417919571014; dx=-0.016177037055493334 evalInputDelta=0.03323575339781826
New Minimum: -56.83417919571014 > -56.86656135604802
WOLFE (weak): th(4.308869380063768)=-56.86656135604802; dx=-0.01608123421201947 evalInputDelta=0.06561791373569292
New Minimum: -56.86656135604802 > -56.99475550384982
WOLFE (weak): th(12.926608140191302)=-56.99475550384982; dx=-0.015935984478184142 evalInputDelta=0.19381206153749275
New Minimum: -56.99475550384982 > -57.54324239909548
WOLFE (weak): th(51.70643256076521)=-57.54324239909548; dx=-0.015266426093045115 evalInputDelta=0.7422989567831593
New Minimum: -57.54324239909548 > -59.15751856799397
END: th(258.53216280382605)=-59.15751856799397; dx=-0.011188871877555743 evalInputDelta=2.356575125681644
Fitness changed from -56.800943442312324 to -59.15751856799397
Iteration 1 complete. Error: -59.15751856799397 Total: 5.5750; Orientation: 0.0157; Line Search: 3.8573
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c58a5cc1-4daf-4d59-96e9-9d4d3a5eb3b7.jpg)
Adding measurement 750e4b21 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-59.15751856799397;dx=-0.01714631991606636
New Minimum: -59.15751856799397 > -62.67421451098247
END: th(556.9906600335335)=-62.67421451098247; dx=-0.011202462432387629 evalInputDelta=3.5166959429885054
Fitness changed from -59.15751856799397 to -62.67421451098247
Iteration 2 complete. Error: -62.67421451098247 Total: 1.7763; Orientation: 0.0165; Line Search: 1.1779
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/0cb7bfe7-b62a-48ea-be7d-755af76213f0.jpg)
Adding measurement 3419f5a9 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-62.67421451098247;dx=-0.020846572385094873
New Minimum: -62.67421451098247 > -73.73087475407175
END: th(1200.0)=-73.73087475407175; dx=-0.012477080165043543 evalInputDelta=11.056660243089276
Fitness changed from -62.67421451098247 to -73.73087475407175
Iteration 3 complete. Error: -73.73087475407175 Total: 1.7931; Orientation: 0.0159; Line Search: 1.2071
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/8e62fa75-b978-42cc-a4c0-850a7766a4da.jpg)
Adding measurement 683792fd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.896e+03, gradient 1.575e-01, dot -0.612; [68d4d6b2-b059-40c6-9722-26dd74f1d178 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.73087475407175, -62.67421451098247, -59.15751856799397, -56.800943442312324
LBFGS Accumulation History: 3 points
Removed measurement 683792fd to history. Total: 3
th(0)=-73.73087475407175;dx=-0.024707277636149876
New Minimum: -73.73087475407175 > -108.11337643487289
END: th(2585.3216280382608)=-108.11337643487289; dx=-0.012213087326069464 evalInputDelta=34.38250168080114
Fitness changed from -73.73087475407175 to -108.11337643487289
Iteration 4 complete. Error: -108.11337643487289 Total: 2.0490; Orientation: 0.2830; Line Search: 1.2020
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/aa542755-7a18-4a4d-b79a-65d8690e950b.jpg)
Adding measurement 1f7683e1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.490e+03, gradient 1.819e-01, dot -0.422; [68d4d6b2-b059-40c6-9722-26dd74f1d178 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -108.11337643487289, -62.67421451098247, -59.15751856799397, -56.800943442312324
LBFGS Accumulation History: 3 points
Removed measurement 1f7683e1 to history. Total: 3
th(0)=-108.11337643487289;dx=-0.032939836553316434
New Minimum: -108.11337643487289 > -173.09687310951062
END: th(5569.9066003353355)=-173.09687310951062; dx=-0.00900797044143973 evalInputDelta=64.98349667463773
Fitness changed from -108.11337643487289 to -173.09687310951062
Iteration 5 complete. Error: -173.09687310951062 Total: 2.0830; Orientation: 0.2836; Line Search: 1.2022
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/ed1f7a0f-e182-44c6-9bcb-428f3d2a4e15.jpg)
Adding measurement 65b50dd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.767e+03, gradient 1.791e-01, dot -0.269; [68d4d6b2-b059-40c6-9722-26dd74f1d178 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -173.09687310951062, -62.67421451098247, -59.15751856799397, -56.800943442312324
LBFGS Accumulation History: 3 points
Removed measurement 65b50dd to history. Total: 3
th(0)=-173.09687310951062;dx=-0.031968245349297486
New Minimum: -173.09687310951062 > -259.52399388740224
END: th(12000.000000000002)=-259.52399388740224; dx=-0.003986500691794017 evalInputDelta=86.42712077789162
Fitness changed from -173.09687310951062 to -259.52399388740224
Iteration 6 complete. Error: -259.52399388740224 Total: 2.0984; Orientation: 0.2831; Line Search: 1.2175
Adding measurement 43ddb033 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.243e+03, gradient 1.712e-01, dot -0.164; [68d4d6b2-b059-40c6-9722-26dd74f1d178 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -259.52399388740224, -62.67421451098247, -59.15751856799397, -56.800943442312324
LBFGS Accumulation History: 3 points
Removed measurement 43ddb033 to history. Total: 3
th(0)=-259.52399388740224;dx=-0.02904908208143044
New Minimum: -259.52399388740224 > -349.3832963824687
END: th(25853.21628038261)=-349.3832963824687; dx=-0.0010646426705488122 evalInputDelta=89.85930249506646
Fitness changed from -259.52399388740224 to -349.3832963824687
Iteration 7 complete. Error: -349.3832963824687 Total: 2.2801; Orientation: 0.2691; Line Search: 1.2706
Adding measurement 4fa32122 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.577e+03, gradient 1.559e-01, dot -0.109; [68d4d6b2-b059-40c6-9722-26dd74f1d178 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -349.3832963824687, -62.67421451098247, -59.15751856799397, -56.800943442312324
LBFGS Accumulation History: 3 points
Removed measurement 4fa32122 to history. Total: 3
th(0)=-349.3832963824687;dx=-0.024221883346397764
New Minimum: -349.3832963824687 > -370.327014128035
WOLF (strong): th(55699.066003353364)=-370.327014128035; dx=5.363973628598805E-4 evalInputDelta=20.94371774556629
New Minimum: -370.327014128035 > -497.7827566633293
END: th(27849.533001676682)=-497.7827566633293; dx=-0.0016496673910846883 evalInputDelta=148.39946028086058
Fitness changed from -349.3832963824687 to -497.7827566633293
Iteration 8 complete. Error: -497.7827566633293 Total: 2.6315; Orientation: 0.2854; Line Search: 1.7971
Adding measurement 2cb083af to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.216e+04, gradient 1.567e-01, dot -0.136; [68d4d6b2-b059-40c6-9722-26dd74f1d178 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -497.7827566633293, -62.67421451098247, -59.15751856799397, -56.800943442312324
LBFGS Accumulation History: 3 points
Removed measurement 2cb083af to history. Total: 3
th(0)=-497.7827566633293;dx=-0.02448609494093454
Armijo: th(60000.00000000002)=-460.93618186763103; dx=0.0012875064039415969 evalInputDelta=-36.846574795698245
New Minimum: -497.7827566633293 > -641.3611339900024
END: th(30000.00000000001)=-641.3611339900024; dx=-0.001355960167247499 evalInputDelta=143.5783773266731
Fitness changed from -497.7827566633293 to -641.3611339900024
Iteration 9 complete. Error: -641.3611339900024 Total: 2.7132; Orientation: 0.2863; Line Search: 1.8874
Adding measurement 4f2e4ad1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.609e+05, gradient 1.581e-01, dot -0.147; [68d4d6b2-b059-40c6-9722-26dd74f1d178 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -641.3611339900024, -62.67421451098247, -59.15751856799397, -56.800943442312324
LBFGS Accumulation History: 3 points
Removed measurement 4f2e4ad1 to history. Total: 3
th(0)=-641.3611339900024;dx=-0.024924231479181363
Armijo: th(64633.04070095654)=-608.4659573881426; dx=0.001339687026930699 evalInputDelta=-32.895176601859816
New Minimum: -641.3611339900024 > -798.8254787153902
END: th(32316.52035047827)=-798.8254787153902; dx=-0.001752765537091188 evalInputDelta=157.46434472538783
Fitness changed from -641.3611339900024 to -798.8254787153902
Iteration 10 complete. Error: -798.8254787153902 Total: 2.6865; Orientation: 0.2862; Line Search: 1.8567
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/edfbee9b-f2bc-4ff7-859b-37664877e4bb.jpg)
Adding measurement 54a94e16 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 4.474e+04, gradient 1.538e-01, dot 0.168; [68d4d6b2-b059-40c6-9722-26dd74f1d178 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-798.8254787153902;dx=-1149.576097108053
Armijo: th(69623.83250419171)=122.73321422077015; dx=0.009375036684634633 evalInputDelta=-921.5586929361604
Armijo: th(34811.916252095856)=113.18651995099037; dx=0.01844052307639208 evalInputDelta=-912.0119986663806
Armijo: th(11603.972084031951)=96.25217744204849; dx=0.05409692405786125 evalInputDelta=-895.0776561574387
Armijo: th(2900.993021007988)=70.52353423160775; dx=0.20722884217245974 evalInputDelta=-869.349012946998
Armijo: th(580.1986042015976)=29.111644477925893; dx=0.9555219175825479 evalInputDelta=-827.9371231933161
Armijo: th(96.69976736693293)=-46.509520516045995; dx=4.983722659117829 evalInputDelta=-752.3159581993442
Armijo: th(13.814252480990419)=-174.89642763753966; dx=25.293096297566603 evalInputDelta=-623.9290510778505
Armijo: th(1.7267815601238024)=-427.6493124482089; dx=94.52399464010024 evalInputDelta=-371.1761662671813
Armijo: th(0.1918646177915336)=-782.3574126276345; dx=-16.643635622203902 evalInputDelta=-16.468066087755687
New Minimum: -798.8254787153902 > -810.0817295025352
END: th(0.019186461779153362)=-810.0817295025352; dx=-483.24060737000036 evalInputDelta=11.25625078714495
Fitness changed from -798.8254787153902 to -810.0817295025352
Iteration 11 complete. Error: -810.0817295025352 Total: 7.7491; Orientation: 0.2763; Line Search: 6.8788
Adding measurement 79975afe to history. Total: 4
Rejected: LBFGS Orientation magnitude: 4.597e+05, gradient 1.531e-01, dot -0.146; [68d4d6b2-b059-40c6-9722-26dd74f1d178 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -810.0817295025352, -798.8254787153902, -62.67421451098247, -59.15751856799397, -56.800943442312324
Rejected: LBFGS Orientation magnitude: 5.001e+05, gradient 1.531e-01, dot -0.153; [68d4d6b2-b059-40c6-9722-26dd74f1d178 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -810.0817295025352, -798.8254787153902, -62.67421451098247, -59.15751856799397
LBFGS Accumulation History: 3 points
Removed measurement 79975afe to history. Total: 4
Removed measurement 54a94e16 to history. Total: 3
th(0)=-810.0817295025352;dx=-0.023332475713348934
New Minimum: -810.0817295025352 > -810.0824843927949
END: th(0.04133597883597886)=-810.0824843927949; dx=-0.019662020045473447 evalInputDelta=7.548902597136475E-4
Fitness changed from -810.0817295025352 to -810.0824843927949
Iteration 12 complete. Error: -810.0824843927949 Total: 2.4253; Orientation: 0.6248; Line Search: 1.2238
Adding measurement 36235b52 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 9.579e+04, gradient 1.530e-01, dot 0.157; [68d4d6b2-b059-40c6-9722-26dd74f1d178 = 1.000/1.000e+00]
th(0)=-810.0824843927949;dx=-2299.8557614016886
Armijo: th(0.08905566675065663)=-773.2245152235021; dx=11.308626367627625 evalInputDelta=-36.8579691692928
Armijo: th(0.04452783337532831)=-809.9785538571596; dx=-334.26173326376465 evalInputDelta=-0.10393053563529975
New Minimum: -810.0824843927949 > -818.0638251298624
END: th(0.014842611125109437)=-818.0638251298624; dx=-738.6059349336404 evalInputDelta=7.981340737067512
Fitness changed from -810.0824843927949 to -818.0638251298624
Iteration 13 complete. Error: -818.0638251298624 Total: 3.5446; Orientation: 0.2834; Line Search: 2.7217
Adding measurement 3910a50d to history. Total: 4
Rejected: LBFGS Orientation magnitude: 3.234e+06, gradient 1.528e-01, dot -0.141; [68d4d6b2-b059-40c6-9722-26dd74f1d178 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -818.0638251298624, -810.0824843927949, -62.67421451098247, -59.15751856799397, -56.800943442312324
Rejected: LBFGS Orientation magnitude: 3.423e+06, gradient 1.528e-01, dot -0.148; [68d4d6b2-b059-40c6-9722-26dd74f1d178 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -818.0638251298624, -810.0824843927949, -62.67421451098247, -59.15751856799397
LBFGS Accumulation History: 3 points
Removed measurement 3910a50d to history. Total: 4
Removed measurement 36235b52 to history. Total: 3
th(0)=-818.0638251298624;dx=-0.02331680586358993
New Minimum: -818.0638251298624 > -818.0643707022501
END: th(0.03197743629858894)=-818.0643707022501; dx=-0.01924126792055923 evalInputDelta=5.45572387750326E-4
Fitness changed from -818.0638251298624 to -818.0643707022501
Iteration 14 complete. Error: -818.0643707022501 Total: 2.4161; Orientation: 0.6144; Line Search: 1.2674
Adding measurement 233bfaf6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.431e+05, gradient 1.528e-01, dot -0.140; [68d4d6b2-b059-40c6-9722-26dd74f1d178 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -818.0643707022501, -62.67421451098247, -59.15751856799397, -56.800943442312324
LBFGS Accumulation History: 3 points
Removed measurement 233bfaf6 to history. Total: 3
th(0)=-818.0643707022501;dx=-0.02321683297288044
New Minimum: -818.0643707022501 > -818.0655114433797
END: th(0.06889329805996477)=-818.0655114433797; dx=-0.019249238989228028 evalInputDelta=0.0011407411295749625
Fitness changed from -818.0643707022501 to -818.0655114433797
Iteration 15 complete. Error: -818.0655114433797 Total: 2.0971; Orientation: 0.2930; Line Search: 1.2318
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/0cebb64c-f339-4f92-ab1c-7a74ca7584f9.jpg)
Final threshold in iteration 16: -818.0655114433797 (> -Infinity) after 43.940s (< 5400.000s)
Returns
-818.0655114433797