BasicOptimizer.scala:89 executed in 160.94 seconds (3.307 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: 464073460439300
Reset training subject: 464076527345500
Adding measurement 6dac7df6 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-92.87911928914983;dx=-1.5104024299563118E-5
New Minimum: -92.87911928914983 > -92.87915219302297
WOLFE (weak): th(2.154434690031884)=-92.87915219302297; dx=-1.4891933592396584E-5 evalInputDelta=3.2903873147915874E-5
New Minimum: -92.87915219302297 > -92.87918808814403
WOLFE (weak): th(4.308869380063768)=-92.87918808814403; dx=-1.489211028271084E-5 evalInputDelta=6.879899420653146E-5
New Minimum: -92.87918808814403 > -92.87932269472445
WOLFE (weak): th(12.926608140191302)=-92.87932269472445; dx=-1.4892350354370065E-5 evalInputDelta=2.034055746236163E-4
New Minimum: -92.87932269472445 > -92.87992692630432
WOLFE (weak): th(51.70643256076521)=-92.87992692630432; dx=-1.4857158173942013E-5 evalInputDelta=8.076371544945005E-4
New Minimum: -92.87992692630432 > -92.8831663780913
WOLFE (weak): th(258.53216280382605)=-92.8831663780913; dx=-1.4876935150755665E-5 evalInputDelta=0.004047088941476318
New Minimum: -92.8831663780913 > -92.90340515924889
WOLFE (weak): th(1551.1929768229563)=-92.90340515924889; dx=-1.4887316459280601E-5 evalInputDelta=0.0242858700990638
New Minimum: -92.90340515924889 > -93.04894845320126
WOLFE (weak): th(10858.350837760694)=-93.04894845320126; dx=-1.4857203554756689E-5 evalInputDelta=0.16982916405143555
New Minimum: -93.04894845320126 > -94.22710402087682
WOLFE (weak): th(86866.80670208555)=-94.22710402087682; dx=-1.4598689323805334E-5 evalInputDelta=1.3479847317269957
New Minimum: -94.22710402087682 > -104.04734784526725
END: th(781801.26031877)=-104.04734784526725; dx=-1.222316590984325E-5 evalInputDelta=11.168228556117427
Fitness changed from -92.87911928914983 to -104.04734784526725
Iteration 1 complete. Error: -104.04734784526725 Total: 40.5816; Orientation: 0.1035; Line Search: 31.6181
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/26bb29e7-66a4-457f-b163-681a1cc3261d.jpg)
Adding measurement 21cb11ac to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-104.04734784526725;dx=-1.154352524912909E-5
New Minimum: -104.04734784526725 > -120.86659525276927
END: th(1684339.7559414052)=-120.86659525276927; dx=-7.643557547205352E-6 evalInputDelta=16.81924740750202
Fitness changed from -104.04734784526725 to -120.86659525276927
Iteration 2 complete. Error: -120.86659525276927 Total: 9.8230; Orientation: 0.1103; Line Search: 5.9007
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/3d93cb43-0a0c-425d-8e34-9d5fd66cdde8.jpg)
Adding measurement 56fcdd12 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-120.86659525276927;dx=-7.766360322795587E-6
New Minimum: -120.86659525276927 > -141.85088130471829
END: th(3628800.0)=-141.85088130471829; dx=-3.837070189531457E-6 evalInputDelta=20.984286051949013
Fitness changed from -120.86659525276927 to -141.85088130471829
Iteration 3 complete. Error: -141.85088130471829 Total: 9.9431; Orientation: 0.1205; Line Search: 6.2796
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/40e42fca-f58b-4cb5-836e-2e651897b948.jpg)
Adding measurement 4602e499 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.769e+04, gradient 2.430e-03, dot -0.685; [ebfcaff5-a1ae-4763-9614-35edded839f9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -141.85088130471829, -120.86659525276927, -104.04734784526725, -92.87911928914983
LBFGS Accumulation History: 3 points
Removed measurement 4602e499 to history. Total: 3
th(0)=-141.85088130471829;dx=-5.886191850991346E-6
New Minimum: -141.85088130471829 > -161.93038041223292
END: th(7818012.6031877)=-161.93038041223292; dx=-8.016925028115743E-7 evalInputDelta=20.079499107514636
Fitness changed from -141.85088130471829 to -161.93038041223292
Iteration 4 complete. Error: -161.93038041223292 Total: 11.6923; Orientation: 2.0585; Line Search: 6.0093
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/79b1b1f9-c4c2-4055-87ea-364f635b1355.jpg)
Adding measurement 7b16b2b1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.387e+04, gradient 2.739e-03, dot -0.444; [ebfcaff5-a1ae-4763-9614-35edded839f9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -161.93038041223292, -120.86659525276927, -104.04734784526725, -92.87911928914983
LBFGS Accumulation History: 3 points
Removed measurement 7b16b2b1 to history. Total: 3
th(0)=-161.93038041223292;dx=-7.482577870788406E-6
Armijo: th(1.684339755941405E7)=-153.58509065262555; dx=2.1135902360334812E-6 evalInputDelta=-8.345289759607368
New Minimum: -161.93038041223292 > -174.37570480532554
WOLF (strong): th(8421698.779707026)=-174.37570480532554; dx=1.6707233207797978E-6 evalInputDelta=12.44532439309262
New Minimum: -174.37570480532554 > -176.54172284975348
END: th(2807232.9265690087)=-176.54172284975348; dx=-2.624430665782609E-6 evalInputDelta=14.611342437520562
Fitness changed from -161.93038041223292 to -176.54172284975348
Iteration 5 complete. Error: -176.54172284975348 Total: 17.3199; Orientation: 2.0681; Line Search: 11.7662
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/ca243279-d1b8-4aa0-8d03-216cd4d9578d.jpg)
Adding measurement 6f8d2cb1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.336e+04, gradient 1.897e-03, dot -0.613; [ebfcaff5-a1ae-4763-9614-35edded839f9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -176.54172284975348, -120.86659525276927, -104.04734784526725, -92.87911928914983
LBFGS Accumulation History: 3 points
Removed measurement 6f8d2cb1 to history. Total: 3
th(0)=-176.54172284975348;dx=-3.590027371484036E-6
New Minimum: -176.54172284975348 > -189.221770916718
END: th(6048000.0)=-189.221770916718; dx=-1.0329510439933097E-6 evalInputDelta=12.680048066964503
Fitness changed from -176.54172284975348 to -189.221770916718
Iteration 6 complete. Error: -189.221770916718 Total: 11.3347; Orientation: 1.7825; Line Search: 5.9861
Adding measurement 6ab3177b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.754e+04, gradient 2.042e-03, dot -0.525; [ebfcaff5-a1ae-4763-9614-35edded839f9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -189.221770916718, -120.86659525276927, -104.04734784526725, -92.87911928914983
LBFGS Accumulation History: 3 points
Removed measurement 6ab3177b to history. Total: 3
th(0)=-189.221770916718;dx=-4.169240713883642E-6
New Minimum: -189.221770916718 > -191.6364836013636
WOLF (strong): th(1.3030021005312834E7)=-191.6364836013636; dx=1.0885488865551254E-6 evalInputDelta=2.4147126846456217
New Minimum: -191.6364836013636 > -198.1935219581829
WOLF (strong): th(6515010.502656417)=-198.1935219581829; dx=2.5348346809338067E-7 evalInputDelta=8.971751041464927
END: th(2171670.167552139)=-195.9875556923748; dx=-1.992956008736407E-6 evalInputDelta=6.765784775656812
Fitness changed from -189.221770916718 to -198.1935219581829
Iteration 7 complete. Error: -198.1935219581829 Total: 17.0044; Orientation: 1.8567; Line Search: 12.3696
Adding measurement 551c27aa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.862e+04, gradient 2.246e-03, dot -0.437; [ebfcaff5-a1ae-4763-9614-35edded839f9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -198.1935219581829, -120.86659525276927, -104.04734784526725, -92.87911928914983
LBFGS Accumulation History: 3 points
Removed measurement 551c27aa to history. Total: 3
th(0)=-198.1935219581829;dx=-5.032571516021977E-6
New Minimum: -198.1935219581829 > -209.7216668362536
END: th(4678721.544281682)=-209.7216668362536; dx=-8.318573380306189E-9 evalInputDelta=11.528144878070691
Fitness changed from -198.1935219581829 to -209.7216668362536
Iteration 8 complete. Error: -209.7216668362536 Total: 10.6683; Orientation: 1.9207; Line Search: 6.0641
Adding measurement 6f2e50d6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.401e+04, gradient 1.796e-03, dot -0.518; [ebfcaff5-a1ae-4763-9614-35edded839f9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -209.7216668362536, -120.86659525276927, -104.04734784526725, -92.87911928914983
LBFGS Accumulation History: 3 points
Removed measurement 6f2e50d6 to history. Total: 3
th(0)=-209.7216668362536;dx=-3.21966296006956E-6
New Minimum: -209.7216668362536 > -214.13883027911763
WOLF (strong): th(1.0080000000000002E7)=-214.13883027911763; dx=9.114186999198151E-7 evalInputDelta=4.417163442864023
New Minimum: -214.13883027911763 > -217.43704068740774
END: th(5040000.000000001)=-217.43704068740774; dx=-2.0073240557794407E-7 evalInputDelta=7.7153738511541405
Fitness changed from -209.7216668362536 to -217.43704068740774
Iteration 9 complete. Error: -217.43704068740774 Total: 15.0362; Orientation: 2.0871; Line Search: 10.1794
Adding measurement fcc8116 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.724e+04, gradient 1.754e-03, dot -0.509; [ebfcaff5-a1ae-4763-9614-35edded839f9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -217.43704068740774, -120.86659525276927, -104.04734784526725, -92.87911928914983
LBFGS Accumulation History: 3 points
Removed measurement fcc8116 to history. Total: 3
th(0)=-217.43704068740774;dx=-3.077816216103161E-6
New Minimum: -217.43704068740774 > -219.42817399424248
WOLF (strong): th(1.0858350837760696E7)=-219.42817399424248; dx=1.040635524621638E-6 evalInputDelta=1.9911333068347403
New Minimum: -219.42817399424248 > -224.2240989008062
WOLF (strong): th(5429175.418880348)=-224.2240989008062; dx=1.1156670997942973E-7 evalInputDelta=6.787058213398467
END: th(1809725.1396267826)=-221.90039997812488; dx=-1.7941316703489465E-6 evalInputDelta=4.463359290717136
Fitness changed from -217.43704068740774 to -224.2240989008062
Iteration 10 complete. Error: -224.2240989008062 Total: 16.8013; Orientation: 1.9040; Line Search: 11.7702
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9babb6b3-aea0-40bf-a2d7-d4ca49db0189.jpg)
Final threshold in iteration 11: -224.2240989008062 (> -Infinity) after 160.942s (< 5400.000s)
Returns
-224.2240989008062