BasicOptimizer.scala:89 executed in 170.55 seconds (3.176 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: 464621672723800
Reset training subject: 464624749548400
Adding measurement 669b8bcc to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-108.2603320597268;dx=-1.4453852133629042E-5
New Minimum: -108.2603320597268 > -108.26036285501921
END: th(2.154434690031884)=-108.26036285501921; dx=-1.2304090126285622E-5 evalInputDelta=3.079529240324064E-5
Fitness changed from -108.2603320597268 to -108.26036285501921
Iteration 1 complete. Error: -108.26036285501921 Total: 15.5280; Orientation: 0.1164; Line Search: 6.1235
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a63c1400-6230-46a2-a174-54e80b8c4783.jpg)
Adding measurement b13312 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-108.26036285501921;dx=-1.232935682869176E-5
New Minimum: -108.26036285501921 > -108.26042444557774
WOLFE (weak): th(4.641588833612779)=-108.26042444557774; dx=-1.2331378475733122E-5 evalInputDelta=6.15905585306109E-5
New Minimum: -108.26042444557774 > -108.26048090355894
WOLFE (weak): th(9.283177667225559)=-108.26048090355894; dx=-1.232027873428114E-5 evalInputDelta=1.1804853973274021E-4
New Minimum: -108.26048090355894 > -108.26072213278333
WOLFE (weak): th(27.849533001676676)=-108.26072213278333; dx=-1.2322273720534579E-5 evalInputDelta=3.5927776411881496E-4
New Minimum: -108.26072213278333 > -108.26179995892191
WOLFE (weak): th(111.3981320067067)=-108.26179995892191; dx=-1.231306217031882E-5 evalInputDelta=0.0014371039027025745
New Minimum: -108.26179995892191 > -108.26755844819107
WOLFE (weak): th(556.9906600335335)=-108.26755844819107; dx=-1.2318313771954867E-5 evalInputDelta=0.007195593171857695
New Minimum: -108.26755844819107 > -108.30354976502285
WOLFE (weak): th(3341.9439602012008)=-108.30354976502285; dx=-1.229991205440249E-5 evalInputDelta=0.04318691000364083
New Minimum: -108.30354976502285 > -108.56218760534664
WOLFE (weak): th(23393.607721408407)=-108.56218760534664; dx=-1.2249479129247109E-5 evalInputDelta=0.3018247503274267
New Minimum: -108.56218760534664 > -110.63525831286911
WOLFE (weak): th(187148.86177126726)=-110.63525831286911; dx=-1.184113885010493E-5 evalInputDelta=2.3748954578499024
New Minimum: -110.63525831286911 > -126.06377538482445
END: th(1684339.7559414054)=-126.06377538482445; dx=-7.841572399399595E-6 evalInputDelta=17.803412529805243
Fitness changed from -108.26036285501921 to -126.06377538482445
Iteration 2 complete. Error: -126.06377538482445 Total: 36.0090; Orientation: 0.1069; Line Search: 32.2974
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b798222a-a767-469c-a53d-d9e12cd18adc.jpg)
Adding measurement 3296e635 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-126.06377538482445;dx=-7.804435219382135E-6
New Minimum: -126.06377538482445 > -146.3039252970578
END: th(3628800.0000000005)=-146.3039252970578; dx=-3.468057041837378E-6 evalInputDelta=20.240149912233335
Fitness changed from -126.06377538482445 to -146.3039252970578
Iteration 3 complete. Error: -146.3039252970578 Total: 11.1679; Orientation: 0.1079; Line Search: 6.4649
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/7193b867-73f4-46d0-84a9-3a07380f96a5.jpg)
Adding measurement 9391e0c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.643e+03, gradient 2.245e-03, dot -0.546; [3c9b5463-7c75-4f95-a004-3ddb644d48aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -146.3039252970578, -126.06377538482445, -108.26036285501921, -108.2603320597268
LBFGS Accumulation History: 3 points
Removed measurement 9391e0c to history. Total: 3
th(0)=-146.3039252970578;dx=-5.013806851509134E-6
New Minimum: -146.3039252970578 > -165.28997464365727
END: th(7818012.603187701)=-165.28997464365727; dx=-8.508606800030301E-7 evalInputDelta=18.986049346599486
Fitness changed from -146.3039252970578 to -165.28997464365727
Iteration 4 complete. Error: -165.28997464365727 Total: 13.3176; Orientation: 1.9444; Line Search: 6.9098
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/92259f6d-c015-4e40-a745-f9cdde1d4efb.jpg)
Adding measurement 211793a3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.034e+04, gradient 2.426e-03, dot -0.299; [3c9b5463-7c75-4f95-a004-3ddb644d48aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -165.28997464365727, -126.06377538482445, -108.26036285501921, -108.2603320597268
LBFGS Accumulation History: 3 points
Removed measurement 211793a3 to history. Total: 3
th(0)=-165.28997464365727;dx=-5.862876167000706E-6
Armijo: th(1.6843397559414055E7)=-160.57982298575587; dx=1.7236653214290821E-6 evalInputDelta=-4.710151657901406
New Minimum: -165.28997464365727 > -176.57160195687626
WOLF (strong): th(8421698.779707028)=-176.57160195687626; dx=1.1330723179819903E-6 evalInputDelta=11.28162731321899
New Minimum: -176.57160195687626 > -176.95599790891922
END: th(2807232.926569009)=-176.95599790891922; dx=-2.227301614832996E-6 evalInputDelta=11.666023265261941
Fitness changed from -165.28997464365727 to -176.95599790891922
Iteration 5 complete. Error: -176.95599790891922 Total: 17.1782; Orientation: 1.8486; Line Search: 11.6188
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/41c3bc19-6071-4fff-8c69-68b86c89d235.jpg)
Adding measurement 15ceb0b1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.853e+04, gradient 1.745e-03, dot -0.557; [3c9b5463-7c75-4f95-a004-3ddb644d48aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -176.95599790891922, -126.06377538482445, -108.26036285501921, -108.2603320597268
LBFGS Accumulation History: 3 points
Removed measurement 15ceb0b1 to history. Total: 3
th(0)=-176.95599790891922;dx=-3.0427542549097606E-6
New Minimum: -176.95599790891922 > -188.12997486681195
END: th(6048000.000000001)=-188.12997486681195; dx=-1.0020302874186369E-6 evalInputDelta=11.173976957892734
Fitness changed from -176.95599790891922 to -188.12997486681195
Iteration 6 complete. Error: -188.12997486681195 Total: 11.9346; Orientation: 2.0602; Line Search: 6.1610
Adding measurement a4ebde5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.251e+04, gradient 1.904e-03, dot -0.463; [3c9b5463-7c75-4f95-a004-3ddb644d48aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -188.12997486681195, -126.06377538482445, -108.26036285501921, -108.2603320597268
LBFGS Accumulation History: 3 points
Removed measurement a4ebde5 to history. Total: 3
th(0)=-188.12997486681195;dx=-3.609480414321229E-6
New Minimum: -188.12997486681195 > -191.07141786487162
WOLF (strong): th(1.3030021005312836E7)=-191.07141786487162; dx=8.786621322767183E-7 evalInputDelta=2.941442998059671
New Minimum: -191.07141786487162 > -196.23872394678546
WOLF (strong): th(6515010.502656418)=-196.23872394678546; dx=1.477997574986864E-7 evalInputDelta=8.108749079973506
END: th(2171670.167552139)=-194.04016692422707; dx=-1.7406067018246136E-6 evalInputDelta=5.9101920574151166
Fitness changed from -188.12997486681195 to -196.23872394678546
Iteration 7 complete. Error: -196.23872394678546 Total: 20.4010; Orientation: 3.3310; Line Search: 13.2845
Adding measurement 726f8378 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.407e+04, gradient 2.123e-03, dot -0.362; [3c9b5463-7c75-4f95-a004-3ddb644d48aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -196.23872394678546, -126.06377538482445, -108.26036285501921, -108.2603320597268
LBFGS Accumulation History: 3 points
Removed measurement 726f8378 to history. Total: 3
th(0)=-196.23872394678546;dx=-4.479701732588601E-6
New Minimum: -196.23872394678546 > -206.62957651528507
END: th(4678721.544281682)=-206.62957651528507; dx=-3.817366108019235E-8 evalInputDelta=10.39085256849961
Fitness changed from -196.23872394678546 to -206.62957651528507
Iteration 8 complete. Error: -206.62957651528507 Total: 11.2702; Orientation: 1.8137; Line Search: 5.9217
Adding measurement 40074c51 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.121e+04, gradient 1.723e-03, dot -0.474; [3c9b5463-7c75-4f95-a004-3ddb644d48aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -206.62957651528507, -126.06377538482445, -108.26036285501921, -108.2603320597268
LBFGS Accumulation History: 3 points
Removed measurement 40074c51 to history. Total: 3
th(0)=-206.62957651528507;dx=-2.945960661991556E-6
New Minimum: -206.62957651528507 > -210.90524771103128
WOLF (strong): th(1.0080000000000002E7)=-210.90524771103128; dx=8.189722879171366E-7 evalInputDelta=4.275671195746213
New Minimum: -210.90524771103128 > -213.80190301881385
END: th(5040000.000000001)=-213.80190301881385; dx=-2.0329564029627226E-7 evalInputDelta=7.1723265035287795
Fitness changed from -206.62957651528507 to -213.80190301881385
Iteration 9 complete. Error: -213.80190301881385 Total: 14.1924; Orientation: 1.8796; Line Search: 9.4150
Adding measurement 537afdce to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.464e+04, gradient 1.693e-03, dot -0.469; [3c9b5463-7c75-4f95-a004-3ddb644d48aa = 1.000/1.000e+00]
Orientation rejected. Popping history element from -213.80190301881385, -126.06377538482445, -108.26036285501921, -108.2603320597268
LBFGS Accumulation History: 3 points
Removed measurement 537afdce to history. Total: 3
th(0)=-213.80190301881385;dx=-2.861476147016426E-6
New Minimum: -213.80190301881385 > -215.98803050213215
WOLF (strong): th(1.0858350837760696E7)=-215.98803050213215; dx=9.448215797976114E-7 evalInputDelta=2.1861274833183018
New Minimum: -215.98803050213215 > -220.2673540520705
WOLF (strong): th(5429175.418880348)=-220.2673540520705; dx=7.802898704309015E-8 evalInputDelta=6.465451033256642
END: th(1809725.1396267826)=-217.99745646435642; dx=-1.6829129097891918E-6 evalInputDelta=4.195553445542572
Fitness changed from -213.80190301881385 to -220.2673540520705
Iteration 10 complete. Error: -220.2673540520705 Total: 18.8438; Orientation: 1.9056; Line Search: 14.0160
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/7b534d7d-4157-42d2-bce1-d30aa65a140b.jpg)
Final threshold in iteration 11: -220.2673540520705 (> -Infinity) after 170.549s (< 5400.000s)
Returns
-220.2673540520705