BasicOptimizer.scala:89 executed in 86.48 seconds (0.811 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: 304620328335900
Reset training subject: 304621995597900
Adding measurement 70508ec1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-154.37760419427434;dx=-2.9038441038132944E-5
New Minimum: -154.37760419427434 > -154.3776508562079
END: th(2.154434690031884)=-154.3776508562079; dx=-1.7910717204882035E-5 evalInputDelta=4.666193356683834E-5
Fitness changed from -154.37760419427434 to -154.3776508562079
Iteration 1 complete. Error: -154.3776508562079 Total: 8.2007; Orientation: 0.0645; Line Search: 3.2037
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 5ef13b39 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-154.3776508562079;dx=-1.776103858003755E-5
New Minimum: -154.3776508562079 > -154.3777375140471
WOLFE (weak): th(4.641588833612779)=-154.3777375140471; dx=-1.7746134519721618E-5 evalInputDelta=8.665783920491776E-5
New Minimum: -154.3777375140471 > -154.37783750380112
WOLFE (weak): th(9.283177667225559)=-154.37783750380112; dx=-1.7735558907728555E-5 evalInputDelta=1.8664759321040947E-4
New Minimum: -154.37783750380112 > -154.3781974663793
WOLFE (weak): th(27.849533001676676)=-154.3781974663793; dx=-1.771643178327909E-5 evalInputDelta=5.466101713977878E-4
New Minimum: -154.3781974663793 > -154.37983728528124
WOLFE (weak): th(111.3981320067067)=-154.37983728528124; dx=-1.7702158604163614E-5 evalInputDelta=0.002186429073333329
New Minimum: -154.37983728528124 > -154.38860268848674
WOLFE (weak): th(556.9906600335335)=-154.38860268848674; dx=-1.769993243018669E-5 evalInputDelta=0.010951832278834672
New Minimum: -154.38860268848674 > -154.44333687438626
WOLFE (weak): th(3341.9439602012008)=-154.44333687438626; dx=-1.7690805974452812E-5 evalInputDelta=0.06568601817835429
New Minimum: -154.44333687438626 > -154.83667506230657
WOLFE (weak): th(23393.607721408407)=-154.83667506230657; dx=-1.7618036697069614E-5 evalInputDelta=0.4590242060986611
New Minimum: -154.83667506230657 > -157.9917614027689
WOLFE (weak): th(187148.86177126726)=-157.9917614027689; dx=-1.7055958130177586E-5 evalInputDelta=3.614110546560994
New Minimum: -157.9917614027689 > -180.78536457501565
END: th(1684339.7559414054)=-180.78536457501565; dx=-1.012544736032794E-5 evalInputDelta=26.40771371880774
Fitness changed from -154.3776508562079 to -180.78536457501565
Iteration 2 complete. Error: -180.78536457501565 Total: 18.3191; Orientation: 0.0647; Line Search: 16.4112
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 6cde2354 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-180.78536457501565;dx=-1.2226762373304485E-5
New Minimum: -180.78536457501565 > -210.87995157871163
END: th(3628800.0000000005)=-210.87995157871163; dx=-4.272969655046839E-6 evalInputDelta=30.094587003695978
Fitness changed from -180.78536457501565 to -210.87995157871163
Iteration 3 complete. Error: -210.87995157871163 Total: 5.1843; Orientation: 0.0642; Line Search: 3.1889
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 243bdfde to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.279e+04, gradient 3.091e-03, dot -0.412; [f541610b-4f14-4da8-a05a-ffa81a87ac75 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -210.87995157871163, -180.78536457501565, -154.3776508562079, -154.37760419427434
LBFGS Accumulation History: 3 points
Removed measurement 243bdfde to history. Total: 3
th(0)=-210.87995157871163;dx=-9.522777018806793E-6
New Minimum: -210.87995157871163 > -234.89220527126065
WOLF (strong): th(7818012.603187701)=-234.89220527126065; dx=4.508356143518412E-8 evalInputDelta=24.012253692549024
END: th(3909006.3015938504)=-231.9703363825557; dx=-2.0794881706720192E-6 evalInputDelta=21.090384803844074
Fitness changed from -210.87995157871163 to -234.89220527126065
Iteration 4 complete. Error: -234.89220527126065 Total: 8.0082; Orientation: 1.1249; Line Search: 4.8814
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 5ffb587d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.236e+03, gradient 3.744e-03, dot -0.156; [f541610b-4f14-4da8-a05a-ffa81a87ac75 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -234.89220527126065, -180.78536457501565, -154.3776508562079, -154.37760419427434
LBFGS Accumulation History: 3 points
Removed measurement 5ffb587d to history. Total: 3
th(0)=-234.89220527126065;dx=-1.4017731545312818E-5
New Minimum: -234.89220527126065 > -243.5608455011956
WOLF (strong): th(8421698.779707028)=-243.5608455011956; dx=4.536177070701416E-6 evalInputDelta=8.668640229934937
New Minimum: -243.5608455011956 > -261.5823287630317
WOLF (strong): th(4210849.389853514)=-261.5823287630317; dx=1.0793266849686449E-6 evalInputDelta=26.690123491771033
END: th(1403616.4632845046)=-252.31487303039; dx=-8.406989961076541E-6 evalInputDelta=17.422667759129354
Fitness changed from -234.89220527126065 to -261.5823287630317
Iteration 5 complete. Error: -261.5823287630317 Total: 9.6590; Orientation: 1.2180; Line Search: 6.5337
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 749555ee to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.765e+04, gradient 3.040e-03, dot -0.249; [f541610b-4f14-4da8-a05a-ffa81a87ac75 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -261.5823287630317, -180.78536457501565, -154.3776508562079, -154.37760419427434
LBFGS Accumulation History: 3 points
Removed measurement 749555ee to history. Total: 3
th(0)=-261.5823287630317;dx=-9.241929533357348E-6
New Minimum: -261.5823287630317 > -278.1989483858784
END: th(3024000.0000000005)=-278.1989483858784; dx=-1.1310927445916195E-6 evalInputDelta=16.616619622846713
Fitness changed from -261.5823287630317 to -278.1989483858784
Iteration 6 complete. Error: -278.1989483858784 Total: 6.4012; Orientation: 1.2268; Line Search: 3.3300
Adding measurement 35d7011b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.869e+04, gradient 2.289e-03, dot -0.419; [f541610b-4f14-4da8-a05a-ffa81a87ac75 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -278.1989483858784, -180.78536457501565, -154.3776508562079, -154.37760419427434
LBFGS Accumulation History: 3 points
Removed measurement 35d7011b to history. Total: 3
th(0)=-278.1989483858784;dx=-5.2397631614604995E-6
New Minimum: -278.1989483858784 > -289.1786655197754
WOLF (strong): th(6515010.502656418)=-289.1786655197754; dx=6.786768550240641E-7 evalInputDelta=10.979717133896997
New Minimum: -289.1786655197754 > -289.1797473411933
END: th(3257505.251328209)=-289.1797473411933; dx=-1.366505696583301E-6 evalInputDelta=10.980798955314924
Fitness changed from -278.1989483858784 to -289.1797473411933
Iteration 7 complete. Error: -289.1797473411933 Total: 7.6940; Orientation: 1.1063; Line Search: 5.0202
Adding measurement 493f72fa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.063e+04, gradient 2.140e-03, dot -0.429; [f541610b-4f14-4da8-a05a-ffa81a87ac75 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -289.1797473411933, -180.78536457501565, -154.3776508562079, -154.37760419427434
LBFGS Accumulation History: 3 points
Removed measurement 493f72fa to history. Total: 3
th(0)=-289.1797473411933;dx=-4.571040800278985E-6
New Minimum: -289.1797473411933 > -296.91914439402524
WOLF (strong): th(7018082.316422524)=-296.91914439402524; dx=7.727069105608893E-7 evalInputDelta=7.739397052831919
New Minimum: -296.91914439402524 > -298.2684427672765
END: th(3509041.158211262)=-298.2684427672765; dx=-7.330080516264923E-7 evalInputDelta=9.088695426083177
Fitness changed from -289.1797473411933 to -298.2684427672765
Iteration 8 complete. Error: -298.2684427672765 Total: 7.4184; Orientation: 1.0639; Line Search: 4.8419
Adding measurement 22f94260 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.164e+04, gradient 2.156e-03, dot -0.398; [f541610b-4f14-4da8-a05a-ffa81a87ac75 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -298.2684427672765, -180.78536457501565, -154.3776508562079, -154.37760419427434
LBFGS Accumulation History: 3 points
Removed measurement 22f94260 to history. Total: 3
th(0)=-298.2684427672765;dx=-4.640120723387416E-6
New Minimum: -298.2684427672765 > -301.2280626256222
WOLF (strong): th(7560000.000000003)=-301.2280626256222; dx=1.5299384927854041E-6 evalInputDelta=2.959619858345718
New Minimum: -301.2280626256222 > -306.2279064212852
WOLF (strong): th(3780000.0000000014)=-306.2279064212852; dx=8.589478052081029E-8 evalInputDelta=7.959463654008687
END: th(1260000.0000000005)=-303.29475138654834; dx=-2.8213778525496515E-6 evalInputDelta=5.026308619271845
Fitness changed from -298.2684427672765 to -306.2279064212852
Iteration 9 complete. Error: -306.2279064212852 Total: 9.2186; Orientation: 1.0377; Line Search: 6.4356
Adding measurement 6e187085 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.052e+04, gradient 2.239e-03, dot -0.346; [f541610b-4f14-4da8-a05a-ffa81a87ac75 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -306.2279064212852, -180.78536457501565, -154.3776508562079, -154.37760419427434
LBFGS Accumulation History: 3 points
Removed measurement 6e187085 to history. Total: 3
th(0)=-306.2279064212852;dx=-5.004847676592496E-6
New Minimum: -306.2279064212852 > -313.9536614234335
END: th(2714587.7094401745)=-313.9536614234335; dx=-4.960668427381327E-7 evalInputDelta=7.7257550021483326
Fitness changed from -306.2279064212852 to -313.9536614234335
Iteration 10 complete. Error: -313.9536614234335 Total: 6.0898; Orientation: 1.0267; Line Search: 3.2941
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -313.9536614234335 (> -Infinity) after 86.476s (< 5400.000s)
Returns
-313.9536614234335