BasicOptimizer.scala:89 executed in 212.37 seconds (2.752 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: 1570400735028
Reset training subject: 1575540784101
Adding measurement 19aa8b51 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=2.8911104649305344;dx=-5.9259976308397076E-6
New Minimum: 2.8911104649305344 > 2.8911044150590897
WOLFE (weak): th(2.154434690031884)=2.8911044150590897; dx=-5.572458805183648E-6 evalInputDelta=6.0498714447021484E-6
New Minimum: 2.8911044150590897 > 2.8910984620451927
WOLFE (weak): th(4.308869380063768)=2.8910984620451927; dx=-5.572460081523174E-6 evalInputDelta=1.2002885341644287E-5
New Minimum: 2.8910984620451927 > 2.891074426472187
WOLFE (weak): th(12.926608140191302)=2.891074426472187; dx=-5.572507925376055E-6 evalInputDelta=3.603845834732056E-5
New Minimum: 2.891074426472187 > 2.8909663781523705
WOLFE (weak): th(51.70643256076521)=2.8909663781523705; dx=-5.572647566524766E-6 evalInputDelta=1.440867781639099E-4
New Minimum: 2.8909663781523705 > 2.8903900757431984
WOLFE (weak): th(258.53216280382605)=2.8903900757431984; dx=-5.572999020521595E-6 evalInputDelta=7.20389187335968E-4
New Minimum: 2.8903900757431984 > 2.8867875188589096
WOLFE (weak): th(1551.1929768229563)=2.8867875188589096; dx=-5.575104101876001E-6 evalInputDelta=0.004322946071624756
New Minimum: 2.8867875188589096 > 2.8608059361577034
WOLFE (weak): th(10858.350837760694)=2.8608059361577034; dx=-5.589046319203124E-6 evalInputDelta=0.030304528772830963
New Minimum: 2.8608059361577034 > 2.6493175998330116
WOLFE (weak): th(86866.80670208555)=2.6493175998330116; dx=-5.472646262467315E-6 evalInputDelta=0.24179286509752274
New Minimum: 2.6493175998330116 > 1.4728764593601227
END: th(781801.26031877)=1.4728764593601227; dx=-1.7602612874745997E-6 evalInputDelta=1.4182340055704117
Fitness changed from 2.8911104649305344 to 1.4728764593601227
Iteration 1 complete. Error: 1.4728764593601227 Total: 57.4312; Orientation: 0.1512; Line Search: 43.7747
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/67dd63d8-953b-4180-88ea-62b078a3c194.jpg)
Adding measurement 70d2c4f4 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=1.4728764593601227;dx=-2.5959928437112635E-6
New Minimum: 1.4728764593601227 > 0.5064968466758728
END: th(1684339.7559414052)=0.5064968466758728; dx=-4.4815033994757805E-7 evalInputDelta=0.9663796126842499
Fitness changed from 1.4728764593601227 to 0.5064968466758728
Iteration 2 complete. Error: 0.5064968466758728 Total: 12.8397; Orientation: 0.0446; Line Search: 8.2500
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ceeb50ea-1dac-4dda-9819-dcbcffc866ca.jpg)
Adding measurement 6cb63de6 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=0.5064968466758728;dx=-9.360962319245684E-7
New Minimum: 0.5064968466758728 > -0.17647716403007507
END: th(3628800.0)=-0.17647716403007507; dx=-1.0563750427452553E-7 evalInputDelta=0.6829740107059479
Fitness changed from 0.5064968466758728 to -0.17647716403007507
Iteration 3 complete. Error: -0.17647716403007507 Total: 12.7409; Orientation: 0.0436; Line Search: 8.6597
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d9ad9170-ef6a-47e7-b116-f80a4b92bd46.jpg)
Adding measurement 4b40bfbd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.092e+03, gradient 6.836e-04, dot -0.573; [38ac1769-e4c4-4d67-9483-186796381acf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.17647716403007507, 0.5064968466758728, 1.4728764593601227, 2.8911104649305344
LBFGS Accumulation History: 3 points
Removed measurement 4b40bfbd to history. Total: 3
th(0)=-0.17647716403007507;dx=-4.6727863961335945E-7
New Minimum: -0.17647716403007507 > -0.6705828011035919
WOLF (strong): th(7818012.6031877)=-0.6705828011035919; dx=2.6489511928629885E-8 evalInputDelta=0.49410563707351685
END: th(3909006.30159385)=-0.6313233375549316; dx=-8.73952421781306E-8 evalInputDelta=0.45484617352485657
Fitness changed from -0.17647716403007507 to -0.6705828011035919
Iteration 4 complete. Error: -0.6705828011035919 Total: 17.1597; Orientation: 1.0521; Line Search: 12.0583
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/c7a8a3ea-88da-4fb7-9403-0a7ec55c3f0a.jpg)
Adding measurement 3bb02339 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.937e+03, gradient 5.871e-04, dot -0.417; [38ac1769-e4c4-4d67-9483-186796381acf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.6705828011035919, 0.5064968466758728, 1.4728764593601227, 2.8911104649305344
LBFGS Accumulation History: 3 points
Removed measurement 3bb02339 to history. Total: 3
th(0)=-0.6705828011035919;dx=-3.4466658991044447E-7
New Minimum: -0.6705828011035919 > -1.0941949859261513
WOLF (strong): th(8421698.779707026)=-1.0941949859261513; dx=1.7397797125874446E-8 evalInputDelta=0.42361218482255936
END: th(4210849.389853513)=-1.0392983257770538; dx=-6.922569183714281E-8 evalInputDelta=0.3687155246734619
Fitness changed from -0.6705828011035919 to -1.0941949859261513
Iteration 5 complete. Error: -1.0941949859261513 Total: 18.7312; Orientation: 1.0959; Line Search: 12.5410
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/87022c42-e0ca-42e2-aea3-06931c4ef977.jpg)
Adding measurement 4ca5e55f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.707e+03, gradient 3.794e-04, dot -0.403; [38ac1769-e4c4-4d67-9483-186796381acf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.0941949859261513, 0.5064968466758728, 1.4728764593601227, 2.8911104649305344
LBFGS Accumulation History: 3 points
Removed measurement 4ca5e55f to history. Total: 3
th(0)=-1.0941949859261513;dx=-1.43971016954066E-7
New Minimum: -1.0941949859261513 > -1.3876463919878006
END: th(9072000.0)=-1.3876463919878006; dx=-1.7662897748139082E-8 evalInputDelta=0.2934514060616493
Fitness changed from -1.0941949859261513 to -1.3876463919878006
Iteration 6 complete. Error: -1.3876463919878006 Total: 14.6744; Orientation: 0.9893; Line Search: 9.6068
Adding measurement 477193d9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.943e+03, gradient 2.612e-04, dot -0.450; [38ac1769-e4c4-4d67-9483-186796381acf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.3876463919878006, 0.5064968466758728, 1.4728764593601227, 2.8911104649305344
LBFGS Accumulation History: 3 points
Removed measurement 477193d9 to history. Total: 3
th(0)=-1.3876463919878006;dx=-6.824227923838877E-8
New Minimum: -1.3876463919878006 > -1.5671976804733276
WOLF (strong): th(1.954503150796925E7)=-1.5671976804733276; dx=1.7305107744202277E-8 evalInputDelta=0.17955128848552704
New Minimum: -1.5671976804733276 > -1.582562804222107
END: th(9772515.753984625)=-1.582562804222107; dx=-1.4546335608329018E-8 evalInputDelta=0.19491641223430634
Fitness changed from -1.3876463919878006 to -1.582562804222107
Iteration 7 complete. Error: -1.582562804222107 Total: 18.3412; Orientation: 0.9873; Line Search: 12.8139
Adding measurement 35eb3d1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.031e+03, gradient 2.232e-04, dot -0.459; [38ac1769-e4c4-4d67-9483-186796381acf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.582562804222107, 0.5064968466758728, 1.4728764593601227, 2.8911104649305344
LBFGS Accumulation History: 3 points
Removed measurement 35eb3d1 to history. Total: 3
th(0)=-1.582562804222107;dx=-4.9806820093179507E-8
New Minimum: -1.582562804222107 > -1.7079514861106873
WOLF (strong): th(2.1054246949267566E7)=-1.7079514861106873; dx=5.363939329089619E-9 evalInputDelta=0.12538868188858032
New Minimum: -1.7079514861106873 > -1.7085943818092346
END: th(1.0527123474633783E7)=-1.7085943818092346; dx=-6.800346097691105E-9 evalInputDelta=0.12603157758712769
Fitness changed from -1.582562804222107 to -1.7085943818092346
Iteration 8 complete. Error: -1.7085943818092346 Total: 19.3580; Orientation: 1.5824; Line Search: 13.5058
Adding measurement 5f74cea7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.992e+03, gradient 2.112e-04, dot -0.430; [38ac1769-e4c4-4d67-9483-186796381acf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7085943818092346, 0.5064968466758728, 1.4728764593601227, 2.8911104649305344
LBFGS Accumulation History: 3 points
Removed measurement 5f74cea7 to history. Total: 3
th(0)=-1.7085943818092346;dx=-4.46229531487743E-8
Armijo: th(2.2680000000000004E7)=-1.6961795017123222; dx=2.626876116116191E-8 evalInputDelta=-0.012414880096912384
New Minimum: -1.7085943818092346 > -1.8040267750620842
WOLF (strong): th(1.1340000000000002E7)=-1.8040267750620842; dx=7.053047892291829E-9 evalInputDelta=0.09543239325284958
END: th(3780000.0000000005)=-1.774778351187706; dx=-2.5102617888550635E-8 evalInputDelta=0.06618396937847137
Fitness changed from -1.7085943818092346 to -1.8040267750620842
Iteration 9 complete. Error: -1.8040267750620842 Total: 23.0461; Orientation: 0.9903; Line Search: 17.5762
Adding measurement ed4dbcc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.886e+03, gradient 2.462e-04, dot -0.346; [38ac1769-e4c4-4d67-9483-186796381acf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8040267750620842, 0.5064968466758728, 1.4728764593601227, 2.8911104649305344
LBFGS Accumulation History: 3 points
Removed measurement ed4dbcc to history. Total: 3
th(0)=-1.8040267750620842;dx=-6.059792668404255E-8
New Minimum: -1.8040267750620842 > -1.8821057453751564
WOLF (strong): th(8143763.128320522)=-1.8821057453751564; dx=6.7518050621941855E-9 evalInputDelta=0.0780789703130722
END: th(4071881.564160261)=-1.877018690109253; dx=-1.496023812723624E-8 evalInputDelta=0.07299191504716873
Fitness changed from -1.8040267750620842 to -1.8821057453751564
Iteration 10 complete. Error: -1.8821057453751564 Total: 17.9569; Orientation: 0.9467; Line Search: 12.9025
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b499f1ac-4ac0-448e-8935-286bf44abb25.jpg)
Final threshold in iteration 11: -1.8821057453751564 (> -Infinity) after 212.355s (< 5400.000s)
Returns
-1.8821057453751564