BasicOptimizer.scala:89 executed in 111.57 seconds (1.453 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: 43541189213000
Reset training subject: 43543560501900
Adding measurement 5390e1e7 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-49.29416388083733;dx=-1.7228206478956366E-6
New Minimum: -49.29416388083733 > -49.294167429003025
END: th(2.154434690031884)=-49.294167429003025; dx=-1.3250684554672025E-6 evalInputDelta=3.5481656937008665E-6
Fitness changed from -49.29416388083733 to -49.294167429003025
Iteration 1 complete. Error: -49.294167429003025 Total: 11.4702; Orientation: 0.0615; Line Search: 4.5024
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c5267ac6-97d6-4d25-98a6-fc66cf912581.jpg)
Adding measurement 56556710 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-49.294167429003025;dx=-1.312431511319491E-6
New Minimum: -49.294167429003025 > -49.29417629941613
WOLFE (weak): th(4.641588833612779)=-49.29417629941613; dx=-1.308781102746997E-6 evalInputDelta=8.870413104489216E-6
New Minimum: -49.29417629941613 > -49.29418162166323
WOLFE (weak): th(9.283177667225559)=-49.29418162166323; dx=-1.30843220498643E-6 evalInputDelta=1.4192660202638763E-5
New Minimum: -49.29418162166323 > -49.29421178105262
WOLFE (weak): th(27.849533001676676)=-49.29421178105262; dx=-1.3064569041347528E-6 evalInputDelta=4.435204959207795E-5
New Minimum: -49.29421178105262 > -49.29432709619479
WOLFE (weak): th(111.3981320067067)=-49.29432709619479; dx=-1.3058599400117352E-6 evalInputDelta=1.596671917667436E-4
New Minimum: -49.29432709619479 > -49.29495866357349
WOLFE (weak): th(556.9906600335335)=-49.29495866357349; dx=-1.3049551528342747E-6 evalInputDelta=7.912345704639279E-4
New Minimum: -49.29495866357349 > -49.29890222855407
WOLFE (weak): th(3341.9439602012008)=-49.29890222855407; dx=-1.3057809908140945E-6 evalInputDelta=0.004734799551044944
New Minimum: -49.29890222855407 > -49.327271342600056
WOLFE (weak): th(23393.607721408407)=-49.327271342600056; dx=-1.3030691276797331E-6 evalInputDelta=0.033103913597031465
New Minimum: -49.327271342600056 > -49.557472560997766
WOLFE (weak): th(187148.86177126726)=-49.557472560997766; dx=-1.2869579619590734E-6 evalInputDelta=0.26330513199474126
New Minimum: -49.557472560997766 > -51.52232963285122
END: th(1684339.7559414054)=-51.52232963285122; dx=-1.136727779854617E-6 evalInputDelta=2.2281622038481927
Fitness changed from -49.294167429003025 to -51.52232963285122
Iteration 2 complete. Error: -51.52232963285122 Total: 26.0825; Orientation: 0.0645; Line Search: 23.1578
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/93b23c20-273b-41c7-8104-810d96edf22f.jpg)
Adding measurement 1ed68e5a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-51.52232963285122;dx=-1.1383956770724508E-6
New Minimum: -51.52232963285122 > -55.26078501798349
END: th(3628800.0000000005)=-55.26078501798349; dx=-8.31757378652113E-7 evalInputDelta=3.7384553851322693
Fitness changed from -51.52232963285122 to -55.26078501798349
Iteration 3 complete. Error: -55.26078501798349 Total: 7.4912; Orientation: 0.0640; Line Search: 4.7847
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/ef55656f-2c19-4a14-8b38-1bbe245b7f86.jpg)
Adding measurement 3e50e75a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.481e+04, gradient 8.898e-04, dot -0.880; [d0395750-c721-4c97-9df1-c3428432619e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.26078501798349, -51.52232963285122, -49.294167429003025, -49.29416388083733
LBFGS Accumulation History: 3 points
Removed measurement 3e50e75a to history. Total: 3
th(0)=-55.26078501798349;dx=-7.914641971634244E-7
New Minimum: -55.26078501798349 > -60.74556360201063
END: th(7818012.603187701)=-60.74556360201063; dx=-5.337582361961275E-7 evalInputDelta=5.48477858402714
Fitness changed from -55.26078501798349 to -60.74556360201063
Iteration 4 complete. Error: -60.74556360201063 Total: 8.2833; Orientation: 1.0769; Line Search: 4.4493
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/5df6244f-83e2-4425-93e6-a308f4a8024a.jpg)
Adding measurement 197c868c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.342e+04, gradient 7.518e-04, dot -0.753; [d0395750-c721-4c97-9df1-c3428432619e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -60.74556360201063, -51.52232963285122, -49.294167429003025, -49.29416388083733
LBFGS Accumulation History: 3 points
Removed measurement 197c868c to history. Total: 3
th(0)=-60.74556360201063;dx=-5.632608606988478E-7
New Minimum: -60.74556360201063 > -68.29531925051981
END: th(1.6843397559414055E7)=-68.29531925051981; dx=-3.1272380775012836E-7 evalInputDelta=7.5497556485091835
Fitness changed from -60.74556360201063 to -68.29531925051981
Iteration 5 complete. Error: -68.29531925051981 Total: 8.4633; Orientation: 1.0555; Line Search: 4.6208
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/72364084-f77d-42f4-89f5-d533b7ca52e7.jpg)
Adding measurement 69fefa21 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.836e+04, gradient 6.924e-04, dot -0.602; [d0395750-c721-4c97-9df1-c3428432619e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.29531925051981, -51.52232963285122, -49.294167429003025, -49.29416388083733
LBFGS Accumulation History: 3 points
Removed measurement 69fefa21 to history. Total: 3
th(0)=-68.29531925051981;dx=-4.780039892389074E-7
New Minimum: -68.29531925051981 > -76.12219493908295
END: th(3.628800000000001E7)=-76.12219493908295; dx=-7.047281395893146E-8 evalInputDelta=7.826875688563135
Fitness changed from -68.29531925051981 to -76.12219493908295
Iteration 6 complete. Error: -76.12219493908295 Total: 8.4086; Orientation: 1.0783; Line Search: 4.7089
Adding measurement 6180a251 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.829e+04, gradient 8.796e-04, dot -0.268; [d0395750-c721-4c97-9df1-c3428432619e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -76.12219493908295, -51.52232963285122, -49.294167429003025, -49.29416388083733
LBFGS Accumulation History: 3 points
Removed measurement 6180a251 to history. Total: 3
th(0)=-76.12219493908295;dx=-7.725590617613836E-7
Armijo: th(7.818012603187701E7)=-68.59583603066619; dx=1.6382053948582918E-7 evalInputDelta=-7.5263589084167535
New Minimum: -76.12219493908295 > -78.09441492493448
WOLF (strong): th(3.9090063015938506E7)=-78.09441492493448; dx=2.278435629506958E-7 evalInputDelta=1.9722199858515381
New Minimum: -78.09441492493448 > -82.3188191398613
END: th(1.3030021005312836E7)=-82.3188191398613; dx=-1.3679582582534515E-7 evalInputDelta=6.196624200778359
Fitness changed from -76.12219493908295 to -82.3188191398613
Iteration 7 complete. Error: -82.3188191398613 Total: 12.5657; Orientation: 0.9867; Line Search: 9.3704
Adding measurement 2686a559 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.185e+04, gradient 6.078e-04, dot -0.509; [d0395750-c721-4c97-9df1-c3428432619e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -82.3188191398613, -51.52232963285122, -49.294167429003025, -49.29416388083733
LBFGS Accumulation History: 3 points
Removed measurement 2686a559 to history. Total: 3
th(0)=-82.3188191398613;dx=-3.683196782271654E-7
New Minimum: -82.3188191398613 > -86.92927298351206
END: th(2.8072329265690096E7)=-86.92927298351206; dx=-1.954217237480564E-8 evalInputDelta=4.61045384365076
Fitness changed from -82.3188191398613 to -86.92927298351206
Iteration 8 complete. Error: -86.92927298351206 Total: 7.7599; Orientation: 0.9809; Line Search: 4.4509
Adding measurement 3979ec0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.491e+04, gradient 7.665e-04, dot -0.344; [d0395750-c721-4c97-9df1-c3428432619e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -86.92927298351206, -51.52232963285122, -49.294167429003025, -49.29416388083733
LBFGS Accumulation History: 3 points
Removed measurement 3979ec0 to history. Total: 3
th(0)=-86.92927298351206;dx=-5.855160178359016E-7
Armijo: th(6.048000000000002E7)=-81.46514060264099; dx=1.7910786062898508E-7 evalInputDelta=-5.464132380871078
New Minimum: -86.92927298351206 > -88.92385572078928
WOLF (strong): th(3.024000000000001E7)=-88.92385572078928; dx=2.0314502858058582E-7 evalInputDelta=1.994582737277213
New Minimum: -88.92385572078928 > -91.02851009558313
END: th(1.0080000000000004E7)=-91.02851009558313; dx=-1.7774483554643558E-7 evalInputDelta=4.099237112071066
Fitness changed from -86.92927298351206 to -91.02851009558313
Iteration 9 complete. Error: -91.02851009558313 Total: 12.6410; Orientation: 1.0018; Line Search: 9.2425
Adding measurement 1d6008e4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.571e+04, gradient 4.918e-04, dot -0.603; [d0395750-c721-4c97-9df1-c3428432619e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.02851009558313, -51.52232963285122, -49.294167429003025, -49.29416388083733
LBFGS Accumulation History: 3 points
Removed measurement 1d6008e4 to history. Total: 3
th(0)=-91.02851009558313;dx=-2.4129722210300683E-7
New Minimum: -91.02851009558313 > -94.70649069990561
END: th(2.1716701675521396E7)=-94.70649069990561; dx=-1.128999670348653E-7 evalInputDelta=3.677980604322485
Fitness changed from -91.02851009558313 to -94.70649069990561
Iteration 10 complete. Error: -94.70649069990561 Total: 7.9635; Orientation: 1.0548; Line Search: 4.7478
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a2d54a09-11f3-4f17-a350-f549712ab51b.jpg)
Final threshold in iteration 11: -94.70649069990561 (> -Infinity) after 111.570s (< 5400.000s)
Returns
-94.70649069990561