BasicOptimizer.scala:89 executed in 207.59 seconds (2.083 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: 12209015784384
Reset training subject: 12213344213033
Adding measurement 607907b1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.3295031040906906;dx=-5.771303978658047E-7
New Minimum: -0.3295031040906906 > -0.32950344681739807
END: th(2.154434690031884)=-0.32950344681739807; dx=-5.174761575857282E-7 evalInputDelta=3.427267074584961E-7
Fitness changed from -0.3295031040906906 to -0.32950344681739807
Iteration 1 complete. Error: -0.32950344681739807 Total: 21.8532; Orientation: 0.0444; Line Search: 8.9927
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/516c925d-0d47-451d-af1b-847a5baf0ac1.jpg)
Adding measurement 3f6ed760 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.32950344681739807;dx=-5.174891532864214E-7
New Minimum: -0.32950344681739807 > -0.32950475811958313
WOLFE (weak): th(4.641588833612779)=-0.32950475811958313; dx=-5.174760242708563E-7 evalInputDelta=1.3113021850585938E-6
New Minimum: -0.32950475811958313 > -0.3295060396194458
WOLFE (weak): th(9.283177667225559)=-0.3295060396194458; dx=-5.174765123324476E-7 evalInputDelta=2.592802047729492E-6
New Minimum: -0.3295060396194458 > -0.3295109272003174
WOLFE (weak): th(27.849533001676676)=-0.3295109272003174; dx=-5.174743537285753E-7 evalInputDelta=7.4803829193115234E-6
New Minimum: -0.3295109272003174 > -0.3295324891805649
WOLFE (weak): th(111.3981320067067)=-0.3295324891805649; dx=-5.174526402748218E-7 evalInputDelta=2.9042363166809082E-5
New Minimum: -0.3295324891805649 > -0.3296477943658829
WOLFE (weak): th(556.9906600335335)=-0.3296477943658829; dx=-5.174025516970499E-7 evalInputDelta=1.4434754848480225E-4
New Minimum: -0.3296477943658829 > -0.33036792278289795
WOLFE (weak): th(3341.9439602012008)=-0.33036792278289795; dx=-5.17038285219176E-7 evalInputDelta=8.644759654998779E-4
New Minimum: -0.33036792278289795 > -0.33553646504879
WOLFE (weak): th(23393.607721408407)=-0.33553646504879; dx=-5.13991251107966E-7 evalInputDelta=0.006033018231391907
New Minimum: -0.33553646504879 > -0.37666888535022736
WOLFE (weak): th(187148.86177126726)=-0.37666888535022736; dx=-4.901896287912362E-7 evalInputDelta=0.047165438532829285
New Minimum: -0.37666888535022736 > -0.6587873697280884
END: th(1684339.7559414054)=-0.6587873697280884; dx=-2.7456214307381414E-7 evalInputDelta=0.3292839229106903
Fitness changed from -0.32950344681739807 to -0.6587873697280884
Iteration 2 complete. Error: -0.6587873697280884 Total: 47.6762; Orientation: 0.0449; Line Search: 43.3126
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e06d4ebf-0844-440b-a92f-940df7c6e698.jpg)
Adding measurement 4c9e67a5 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.6587873697280884;dx=-2.5597873199466644E-7
New Minimum: -0.6587873697280884 > -0.9832669645547867
END: th(3628800.0000000005)=-0.9832669645547867; dx=-1.2004396778757298E-7 evalInputDelta=0.3244795948266983
Fitness changed from -0.6587873697280884 to -0.9832669645547867
Iteration 3 complete. Error: -0.9832669645547867 Total: 13.0797; Orientation: 0.0457; Line Search: 8.5248
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/41ad306b-fccf-4bb4-b493-6a533d6057c2.jpg)
Adding measurement 260be6d1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.966e+03, gradient 3.777e-04, dot -0.645; [657803ab-29af-4456-8ab4-1f04dbe66977 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.9832669645547867, -0.6587873697280884, -0.32950344681739807, -0.3295031040906906
LBFGS Accumulation History: 3 points
Removed measurement 260be6d1 to history. Total: 3
th(0)=-0.9832669645547867;dx=-1.426458007150294E-7
New Minimum: -0.9832669645547867 > -1.291468307375908
END: th(7818012.603187701)=-1.291468307375908; dx=-3.887503300781504E-8 evalInputDelta=0.3082013428211212
Fitness changed from -0.9832669645547867 to -1.291468307375908
Iteration 4 complete. Error: -1.291468307375908 Total: 14.5593; Orientation: 1.0126; Line Search: 8.4566
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/15d5402b-0061-4f58-94a0-eccda029174d.jpg)
Adding measurement 1d7634e7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.751e+03, gradient 3.331e-04, dot -0.426; [657803ab-29af-4456-8ab4-1f04dbe66977 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.291468307375908, -0.6587873697280884, -0.32950344681739807, -0.3295031040906906
LBFGS Accumulation History: 3 points
Removed measurement 1d7634e7 to history. Total: 3
th(0)=-1.291468307375908;dx=-1.1096089289793657E-7
New Minimum: -1.291468307375908 > -1.45684415102005
WOLF (strong): th(1.6843397559414055E7)=-1.45684415102005; dx=1.3126185751975986E-8 evalInputDelta=0.16537584364414215
New Minimum: -1.45684415102005 > -1.4859360605478287
END: th(8421698.779707028)=-1.4859360605478287; dx=-4.45738849617889E-9 evalInputDelta=0.19446775317192078
Fitness changed from -1.291468307375908 to -1.4859360605478287
Iteration 5 complete. Error: -1.4859360605478287 Total: 18.5631; Orientation: 1.0050; Line Search: 13.3087
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/183e5dc5-a2f4-4a99-8700-e3406430fadb.jpg)
Adding measurement 5dcdd9b0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.011e+03, gradient 2.981e-04, dot -0.359; [657803ab-29af-4456-8ab4-1f04dbe66977 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4859360605478287, -0.6587873697280884, -0.32950344681739807, -0.3295031040906906
LBFGS Accumulation History: 3 points
Removed measurement 5dcdd9b0 to history. Total: 3
th(0)=-1.4859360605478287;dx=-8.88700545744895E-8
New Minimum: -1.4859360605478287 > -1.535758376121521
WOLF (strong): th(1.8144000000000004E7)=-1.535758376121521; dx=2.767152189794831E-8 evalInputDelta=0.04982231557369232
New Minimum: -1.535758376121521 > -1.6378545463085175
WOLF (strong): th(9072000.000000002)=-1.6378545463085175; dx=7.987896116657108E-9 evalInputDelta=0.15191848576068878
END: th(3024000.0000000005)=-1.586698442697525; dx=-4.5763813489296545E-8 evalInputDelta=0.10076238214969635
Fitness changed from -1.4859360605478287 to -1.6378545463085175
Iteration 6 complete. Error: -1.6378545463085175 Total: 22.5441; Orientation: 1.0210; Line Search: 17.3424
Adding measurement 179f8ac2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.063e+03, gradient 2.668e-04, dot -0.337; [657803ab-29af-4456-8ab4-1f04dbe66977 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6378545463085175, -0.6587873697280884, -0.32950344681739807, -0.3295031040906906
LBFGS Accumulation History: 3 points
Removed measurement 179f8ac2 to history. Total: 3
th(0)=-1.6378545463085175;dx=-7.115654552307037E-8
New Minimum: -1.6378545463085175 > -1.755431428551674
END: th(6515010.502656418)=-1.755431428551674; dx=-9.737248111014609E-9 evalInputDelta=0.11757688224315643
Fitness changed from -1.6378545463085175 to -1.755431428551674
Iteration 7 complete. Error: -1.755431428551674 Total: 14.3774; Orientation: 1.1429; Line Search: 8.8979
Adding measurement 48caa876 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.481e+03, gradient 1.842e-04, dot -0.505; [657803ab-29af-4456-8ab4-1f04dbe66977 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.755431428551674, -0.6587873697280884, -0.32950344681739807, -0.3295031040906906
LBFGS Accumulation History: 3 points
Removed measurement 48caa876 to history. Total: 3
th(0)=-1.755431428551674;dx=-3.3917343147865223E-8
New Minimum: -1.755431428551674 > -1.8483044356107712
WOLF (strong): th(1.4036164632845048E7)=-1.8483044356107712; dx=2.6111952100697894E-9 evalInputDelta=0.09287300705909729
END: th(7018082.316422524)=-1.8338401466608047; dx=-1.2019046437452857E-8 evalInputDelta=0.07840871810913086
Fitness changed from -1.755431428551674 to -1.8483044356107712
Iteration 8 complete. Error: -1.8483044356107712 Total: 18.1205; Orientation: 1.0533; Line Search: 12.8661
Adding measurement 2e8af8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.101e+03, gradient 2.406e-04, dot -0.267; [657803ab-29af-4456-8ab4-1f04dbe66977 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8483044356107712, -0.6587873697280884, -0.32950344681739807, -0.3295031040906906
LBFGS Accumulation History: 3 points
Removed measurement 2e8af8 to history. Total: 3
th(0)=-1.8483044356107712;dx=-5.7892585814135807E-8
New Minimum: -1.8483044356107712 > -1.8725245743989944
WOLF (strong): th(1.5120000000000006E7)=-1.8725245743989944; dx=2.1099151920308498E-8 evalInputDelta=0.024220138788223267
New Minimum: -1.8725245743989944 > -1.9315714836120605
WOLF (strong): th(7560000.000000003)=-1.9315714836120605; dx=4.934669396559021E-9 evalInputDelta=0.08326704800128937
END: th(2520000.000000001)=-1.9040329903364182; dx=-3.0837756078891275E-8 evalInputDelta=0.05572855472564697
Fitness changed from -1.8483044356107712 to -1.9315714836120605
Iteration 9 complete. Error: -1.9315714836120605 Total: 23.0339; Orientation: 1.5723; Line Search: 17.2713
Adding measurement 4749f28a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.355e+03, gradient 1.721e-04, dot -0.387; [657803ab-29af-4456-8ab4-1f04dbe66977 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9315714836120605, -0.6587873697280884, -0.32950344681739807, -0.3295031040906906
LBFGS Accumulation History: 3 points
Removed measurement 4749f28a to history. Total: 3
th(0)=-1.9315714836120605;dx=-2.963155390051348E-8
New Minimum: -1.9315714836120605 > -1.984337642788887
END: th(5429175.418880349)=-1.984337642788887; dx=-1.006470012945539E-8 evalInputDelta=0.05276615917682648
Fitness changed from -1.9315714836120605 to -1.984337642788887
Iteration 10 complete. Error: -1.984337642788887 Total: 13.7171; Orientation: 1.0091; Line Search: 8.7658
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a8bfc2e9-4fde-48cb-9555-01fadeca41ec.jpg)
Final threshold in iteration 11: -1.984337642788887 (> -Infinity) after 207.594s (< 5400.000s)
Returns
-1.984337642788887