BasicOptimizer.scala:89 executed in 83.16 seconds (1.226 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: 311209079323200
Reset training subject: 311210796654500
Corrupt weights measurement
LBFGS Accumulation History: 0 points
Constructing line search parameters: GD+Trust
New Minimum: -167.68660868221198 > -167.80722334640294
th(0)=-167.80722334640294;dx=-3.9530058936294446E-5
New Minimum: -167.80722334640294 > -167.80730306903914
END: th(2.154434690031884)=-167.80730306903914; dx=-3.31605725971274E-5 evalInputDelta=7.972263620104059E-5
Fitness changed from -167.68660868221198 to -167.80730306903914
Iteration 1 complete. Error: -167.80730306903914 Total: 8.3955; Orientation: 0.0370; Line Search: 3.2756
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c302cec2-c8a1-4a4f-a35d-de77b9830bfe.jpg)
Adding measurement 758fbfa2 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-167.80730306903914;dx=-3.314117870239333E-5
New Minimum: -167.80730306903914 > -167.807468646701
WOLFE (weak): th(4.641588833612779)=-167.807468646701; dx=-3.313190250578374E-5 evalInputDelta=1.6557766187474954E-4
New Minimum: -167.807468646701 > -167.8076403566963
WOLFE (weak): th(9.283177667225559)=-167.8076403566963; dx=-3.3125680283482384E-5 evalInputDelta=3.3728765717455644E-4
New Minimum: -167.8076403566963 > -167.80830879750468
WOLFE (weak): th(27.849533001676676)=-167.80830879750468; dx=-3.309397826064729E-5 evalInputDelta=0.001005728465543143
New Minimum: -167.80830879750468 > -167.81133821145968
WOLFE (weak): th(111.3981320067067)=-167.81133821145968; dx=-3.310476392380461E-5 evalInputDelta=0.0040351424205482544
New Minimum: -167.81133821145968 > -167.8274778109566
WOLFE (weak): th(556.9906600335335)=-167.8274778109566; dx=-3.306595447831035E-5 evalInputDelta=0.02017474191745805
New Minimum: -167.8274778109566 > -167.92829677967376
WOLFE (weak): th(3341.9439602012008)=-167.92829677967376; dx=-3.307856649417878E-5 evalInputDelta=0.12099371063462172
New Minimum: -167.92829677967376 > -168.65139889220393
WOLFE (weak): th(23393.607721408407)=-168.65139889220393; dx=-3.279475375720804E-5 evalInputDelta=0.8440958231647926
New Minimum: -168.65139889220393 > -174.2940005956092
WOLFE (weak): th(187148.86177126726)=-174.2940005956092; dx=-3.0236752399064364E-5 evalInputDelta=6.486697526570055
New Minimum: -174.2940005956092 > -209.31066043723825
END: th(1684339.7559414054)=-209.31066043723825; dx=-1.3654326826816185E-5 evalInputDelta=41.50335736819912
Fitness changed from -167.80730306903914 to -209.31066043723825
Iteration 2 complete. Error: -209.31066043723825 Total: 18.3790; Orientation: 0.0625; Line Search: 16.5388
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/184d2e0a-f2f9-4a20-be9f-67737ee765ef.jpg)
Adding measurement 6f3d05a0 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-209.31066043723825;dx=-1.4595271799437764E-5
New Minimum: -209.31066043723825 > -246.3083149243642
END: th(3628800.0000000005)=-246.3083149243642; dx=-5.373818094932424E-6 evalInputDelta=36.99765448712594
Fitness changed from -209.31066043723825 to -246.3083149243642
Iteration 3 complete. Error: -246.3083149243642 Total: 5.1327; Orientation: 0.0610; Line Search: 3.2632
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/dc1e5de0-9510-4050-88a8-7a8adedf8165.jpg)
Adding measurement 7ca7fa5b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-246.3083149243642;dx=-9.241051554269051E-6
New Minimum: -246.3083149243642 > -273.4399654132796
WOLF (strong): th(7818012.603187701)=-273.4399654132796; dx=8.594705360313193E-8 evalInputDelta=27.131650488915398
END: th(3909006.3015938504)=-269.3098262340967; dx=-2.6623023808529284E-6 evalInputDelta=23.001511309732507
Fitness changed from -246.3083149243642 to -273.4399654132796
Iteration 4 complete. Error: -273.4399654132796 Total: 6.8125; Orientation: 0.0610; Line Search: 4.9601
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d62c92d9-4175-4357-ae30-a317eadad41f.jpg)
Adding measurement 104061b9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.513e+04, gradient 3.639e-03, dot -0.446; [35e133a0-7046-4178-8ee3-c2d319ca5e7c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -273.4399654132796, -246.3083149243642, -209.31066043723825, -167.80730306903914
LBFGS Accumulation History: 3 points
Removed measurement 104061b9 to history. Total: 3
th(0)=-273.4399654132796;dx=-1.3221039026131496E-5
New Minimum: -273.4399654132796 > -275.62120659267157
WOLF (strong): th(8421698.779707028)=-275.62120659267157; dx=5.4706407573628165E-6 evalInputDelta=2.181241179391975
New Minimum: -275.62120659267157 > -296.9397586059816
WOLF (strong): th(4210849.389853514)=-296.9397586059816; dx=1.6787630391085144E-6 evalInputDelta=23.499793192701986
END: th(1403616.4632845046)=-289.53877391502846; dx=-7.707342494983962E-6 evalInputDelta=16.098808501748863
Fitness changed from -273.4399654132796 to -296.9397586059816
Iteration 5 complete. Error: -296.9397586059816 Total: 9.4940; Orientation: 1.0623; Line Search: 6.5382
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/dd5c3103-a3c7-4a9b-bf16-36dbc1221456.jpg)
Adding measurement 3b8f2488 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.025e+04, gradient 2.857e-03, dot -0.463; [35e133a0-7046-4178-8ee3-c2d319ca5e7c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -296.9397586059816, -246.3083149243642, -209.31066043723825, -167.80730306903914
LBFGS Accumulation History: 3 points
Removed measurement 3b8f2488 to history. Total: 3
th(0)=-296.9397586059816;dx=-8.140509895032203E-6
New Minimum: -296.9397586059816 > -311.6162482123551
END: th(3024000.0000000005)=-311.6162482123551; dx=-1.0773593791850964E-6 evalInputDelta=14.676489606373536
Fitness changed from -296.9397586059816 to -311.6162482123551
Iteration 6 complete. Error: -311.6162482123551 Total: 6.0989; Orientation: 1.0977; Line Search: 3.2143
Adding measurement 61cac66f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.808e+04, gradient 2.051e-03, dot -0.582; [35e133a0-7046-4178-8ee3-c2d319ca5e7c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -311.6162482123551, -246.3083149243642, -209.31066043723825, -167.80730306903914
LBFGS Accumulation History: 3 points
Removed measurement 61cac66f to history. Total: 3
th(0)=-311.6162482123551;dx=-4.204985732954032E-6
New Minimum: -311.6162482123551 > -321.90565088343953
WOLF (strong): th(6515010.502656418)=-321.90565088343953; dx=3.1381661893026717E-7 evalInputDelta=10.289402671084417
END: th(3257505.251328209)=-320.8878826439462; dx=-1.4036174912169762E-6 evalInputDelta=9.27163443159111
Fitness changed from -311.6162482123551 to -321.90565088343953
Iteration 7 complete. Error: -321.90565088343953 Total: 7.6760; Orientation: 1.1476; Line Search: 4.9446
Adding measurement 27c0aa00 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.452e+04, gradient 2.739e-03, dot -0.411; [35e133a0-7046-4178-8ee3-c2d319ca5e7c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -321.90565088343953, -246.3083149243642, -209.31066043723825, -167.80730306903914
LBFGS Accumulation History: 3 points
Removed measurement 27c0aa00 to history. Total: 3
th(0)=-321.90565088343953;dx=-7.5006994154054706E-6
Armijo: th(7018082.316422524)=-320.98653972133525; dx=4.114142879955778E-6 evalInputDelta=-0.9191111621042864
New Minimum: -321.90565088343953 > -333.44477863362096
WOLF (strong): th(3509041.158211262)=-333.44477863362096; dx=9.885483085522223E-7 evalInputDelta=11.539127750181422
END: th(1169680.3860704207)=-329.6178323872122; dx=-4.572697362524424E-6 evalInputDelta=7.712181503772683
Fitness changed from -321.90565088343953 to -333.44477863362096
Iteration 8 complete. Error: -333.44477863362096 Total: 9.2867; Orientation: 0.9852; Line Search: 6.5689
Adding measurement 62896fc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.735e+04, gradient 2.058e-03, dot -0.477; [35e133a0-7046-4178-8ee3-c2d319ca5e7c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -333.44477863362096, -246.3083149243642, -209.31066043723825, -167.80730306903914
LBFGS Accumulation History: 3 points
Removed measurement 62896fc to history. Total: 3
th(0)=-333.44477863362096;dx=-4.231754979387055E-6
New Minimum: -333.44477863362096 > -340.52488538820853
END: th(2520000.000000001)=-340.52488538820853; dx=-1.1508999483784154E-6 evalInputDelta=7.080106754587575
Fitness changed from -333.44477863362096 to -340.52488538820853
Iteration 9 complete. Error: -340.52488538820853 Total: 5.8862; Orientation: 1.0656; Line Search: 3.3304
Adding measurement 260ddff to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.875e+04, gradient 1.504e-03, dot -0.592; [35e133a0-7046-4178-8ee3-c2d319ca5e7c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -340.52488538820853, -246.3083149243642, -209.31066043723825, -167.80730306903914
LBFGS Accumulation History: 3 points
Removed measurement 260ddff to history. Total: 3
th(0)=-340.52488538820853;dx=-2.2569516782578953E-6
New Minimum: -340.52488538820853 > -347.8653481717236
END: th(5429175.418880349)=-347.8653481717236; dx=-6.479184982877163E-7 evalInputDelta=7.340462783515079
Fitness changed from -340.52488538820853 to -347.8653481717236
Iteration 10 complete. Error: -347.8653481717236 Total: 5.7143; Orientation: 1.0062; Line Search: 3.1861
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/575f2b98-3da5-4da5-bbff-b58f4996d291.jpg)
Final threshold in iteration 11: -347.8653481717236 (> -Infinity) after 83.158s (< 5400.000s)
Returns
-347.8653481717236