BasicOptimizer.scala:89 executed in 132.89 seconds (1.974 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: 31812437687000
Reset training subject: 31815104583100
Adding measurement 49231748 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-75.44435890820938;dx=-4.688950586354907E-6
New Minimum: -75.44435890820938 > -75.44436797950323
END: th(2.154434690031884)=-75.44436797950323; dx=-3.20887847430618E-6 evalInputDelta=9.071293845863693E-6
Fitness changed from -75.44435890820938 to -75.44436797950323
Iteration 1 complete. Error: -75.44436797950323 Total: 12.9384; Orientation: 0.0617; Line Search: 5.0391
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/86541f70-b4b2-4abb-9ee7-89d9dc573991.jpg)
Adding measurement 2b28ec74 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-75.44436797950323;dx=-3.1783200347794352E-6
New Minimum: -75.44436797950323 > -75.44438385426484
WOLFE (weak): th(4.641588833612779)=-75.44438385426484; dx=-3.17881580008448E-6 evalInputDelta=1.5874761615464195E-5
New Minimum: -75.44438385426484 > -75.4443997290231
WOLFE (weak): th(9.283177667225559)=-75.4443997290231; dx=-3.177723272012123E-6 evalInputDelta=3.1749519877166676E-5
New Minimum: -75.4443997290231 > -75.44446549584319
WOLFE (weak): th(27.849533001676676)=-75.44446549584319; dx=-3.1746979644361712E-6 evalInputDelta=9.751633996302189E-5
New Minimum: -75.44446549584319 > -75.44477391878634
WOLFE (weak): th(111.3981320067067)=-75.44477391878634; dx=-3.172814551135524E-6 evalInputDelta=4.059392831123887E-4
New Minimum: -75.44477391878634 > -75.44640445736387
WOLFE (weak): th(556.9906600335335)=-75.44640445736387; dx=-3.1724480446627953E-6 evalInputDelta=0.002036477860642094
New Minimum: -75.44640445736387 > -75.45659962697314
WOLFE (weak): th(3341.9439602012008)=-75.45659962697314; dx=-3.171701958248553E-6 evalInputDelta=0.012231647469917561
New Minimum: -75.45659962697314 > -75.52993885302122
WOLFE (weak): th(23393.607721408407)=-75.52993885302122; dx=-3.1678345943934285E-6 evalInputDelta=0.08557087351799453
New Minimum: -75.52993885302122 > -76.12449318914439
WOLFE (weak): th(187148.86177126726)=-76.12449318914439; dx=-3.1220884638888013E-6 evalInputDelta=0.6801252096411616
New Minimum: -76.12449318914439 > -81.06437593796603
END: th(1684339.7559414054)=-81.06437593796603; dx=-2.566763017654103E-6 evalInputDelta=5.620007958462807
Fitness changed from -75.44436797950323 to -81.06437593796603
Iteration 2 complete. Error: -81.06437593796603 Total: 29.3575; Orientation: 0.0616; Line Search: 26.1152
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/5688e558-26ff-4670-abfc-eacc9269dd07.jpg)
Adding measurement 2afe28fe to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-81.06437593796603;dx=-2.5157915942038464E-6
New Minimum: -81.06437593796603 > -89.18700259233856
END: th(3628800.0000000005)=-89.18700259233856; dx=-1.4731624056842925E-6 evalInputDelta=8.122626654372525
Fitness changed from -81.06437593796603 to -89.18700259233856
Iteration 3 complete. Error: -89.18700259233856 Total: 8.2387; Orientation: 0.0625; Line Search: 5.2023
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/9283c29e-76dc-4c0b-9efd-9f2df4e051f5.jpg)
Adding measurement 2cc6703e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.142e+04, gradient 1.243e-03, dot -0.717; [364fd0bb-1874-41b3-9118-5c44f320833d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -89.18700259233856, -81.06437593796603, -75.44436797950323, -75.44435890820938
LBFGS Accumulation History: 3 points
Removed measurement 2cc6703e to history. Total: 3
th(0)=-89.18700259233856;dx=-1.541732371033858E-6
New Minimum: -89.18700259233856 > -99.06211261570196
END: th(7818012.603187701)=-99.06211261570196; dx=-7.088091758650792E-7 evalInputDelta=9.875110023363405
Fitness changed from -89.18700259233856 to -99.06211261570196
Iteration 4 complete. Error: -99.06211261570196 Total: 9.2847; Orientation: 1.0710; Line Search: 5.3039
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/0cb37c1a-1c4a-432c-bd8e-9f17a8570c2d.jpg)
Adding measurement 2951a607 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.347e+04, gradient 1.156e-03, dot -0.519; [364fd0bb-1874-41b3-9118-5c44f320833d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -99.06211261570196, -81.06437593796603, -75.44436797950323, -75.44435890820938
LBFGS Accumulation History: 3 points
Removed measurement 2951a607 to history. Total: 3
th(0)=-99.06211261570196;dx=-1.3343188524805267E-6
New Minimum: -99.06211261570196 > -104.12815350763722
WOLF (strong): th(1.6843397559414055E7)=-104.12815350763722; dx=2.0224760760267363E-7 evalInputDelta=5.066040891935259
New Minimum: -104.12815350763722 > -104.95119686518282
END: th(8421698.779707028)=-104.95119686518282; dx=-1.4938605937973664E-7 evalInputDelta=5.8890842494808595
Fitness changed from -99.06211261570196 to -104.95119686518282
Iteration 5 complete. Error: -104.95119686518282 Total: 12.0242; Orientation: 1.0569; Line Search: 7.8691
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/32dfe91a-bcc5-4c8c-a458-218a38ae98f6.jpg)
Adding measurement a78706d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.328e+04, gradient 1.352e-03, dot -0.364; [364fd0bb-1874-41b3-9118-5c44f320833d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -104.95119686518282, -81.06437593796603, -75.44436797950323, -75.44435890820938
LBFGS Accumulation History: 3 points
Removed measurement a78706d to history. Total: 3
th(0)=-104.95119686518282;dx=-1.8256600893127323E-6
Armijo: th(1.8144000000000004E7)=-99.84572036055812; dx=8.051047073237308E-7 evalInputDelta=-5.105476504624704
New Minimum: -104.95119686518282 > -108.51391361956816
WOLF (strong): th(9072000.000000002)=-108.51391361956816; dx=6.263655600066867E-7 evalInputDelta=3.5627167543853346
New Minimum: -108.51391361956816 > -109.5052203354631
END: th(3024000.0000000005)=-109.5052203354631; dx=-7.558710528070126E-7 evalInputDelta=4.554023470280271
Fitness changed from -104.95119686518282 to -109.5052203354631
Iteration 6 complete. Error: -109.5052203354631 Total: 14.4450; Orientation: 1.0536; Line Search: 10.4241
Adding measurement 8916f7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.283e+04, gradient 8.968e-04, dot -0.679; [364fd0bb-1874-41b3-9118-5c44f320833d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -109.5052203354631, -81.06437593796603, -75.44436797950323, -75.44435890820938
LBFGS Accumulation History: 3 points
Removed measurement 8916f7 to history. Total: 3
th(0)=-109.5052203354631;dx=-8.038448483946256E-7
New Minimum: -109.5052203354631 > -114.0027912644604
END: th(6515010.502656418)=-114.0027912644604; dx=-4.5622428527675253E-7 evalInputDelta=4.497570928997305
Fitness changed from -109.5052203354631 to -114.0027912644604
Iteration 7 complete. Error: -114.0027912644604 Total: 8.7775; Orientation: 1.0545; Line Search: 5.2815
Adding measurement 67f5412 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.537e+04, gradient 9.293e-04, dot -0.596; [364fd0bb-1874-41b3-9118-5c44f320833d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -114.0027912644604, -81.06437593796603, -75.44436797950323, -75.44435890820938
LBFGS Accumulation History: 3 points
Removed measurement 67f5412 to history. Total: 3
th(0)=-114.0027912644604;dx=-8.622373774245075E-7
New Minimum: -114.0027912644604 > -118.01408721843114
WOLF (strong): th(1.4036164632845048E7)=-118.01408721843114; dx=3.048369217801606E-8 evalInputDelta=4.011295953970745
END: th(7018082.316422524)=-117.66653865014504; dx=-1.9899240970736422E-7 evalInputDelta=3.663747385684644
Fitness changed from -114.0027912644604 to -118.01408721843114
Iteration 8 complete. Error: -118.01408721843114 Total: 11.6639; Orientation: 1.0432; Line Search: 8.1676
Adding measurement 26982c3b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.041e+04, gradient 1.377e-03, dot -0.268; [364fd0bb-1874-41b3-9118-5c44f320833d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -118.01408721843114, -81.06437593796603, -75.44436797950323, -75.44435890820938
LBFGS Accumulation History: 3 points
Removed measurement 26982c3b to history. Total: 3
th(0)=-118.01408721843114;dx=-1.8943432844896305E-6
Armijo: th(1.5120000000000006E7)=-114.50369381543494; dx=1.1724685353682365E-6 evalInputDelta=-3.5103934029962005
New Minimum: -118.01408721843114 > -123.75394148075384
WOLF (strong): th(7560000.000000003)=-123.75394148075384; dx=5.649398065780755E-7 evalInputDelta=5.7398542623226945
END: th(2520000.000000001)=-122.49686900963658; dx=-1.1641607477613738E-6 evalInputDelta=4.48278179120544
Fitness changed from -118.01408721843114 to -123.75394148075384
Iteration 9 complete. Error: -123.75394148075384 Total: 13.8924; Orientation: 1.0424; Line Search: 10.3022
Adding measurement 24bc3e3f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.523e+04, gradient 1.258e-03, dot -0.306; [364fd0bb-1874-41b3-9118-5c44f320833d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -123.75394148075384, -81.06437593796603, -75.44436797950323, -75.44435890820938
LBFGS Accumulation History: 3 points
Removed measurement 24bc3e3f to history. Total: 3
th(0)=-123.75394148075384;dx=-1.5822979601358752E-6
New Minimum: -123.75394148075384 > -128.12430198774436
WOLF (strong): th(5429175.418880349)=-128.12430198774436; dx=1.801591578313909E-7 evalInputDelta=4.370360506990522
END: th(2714587.7094401745)=-127.41285591772339; dx=-7.234643285507371E-7 evalInputDelta=3.658914436969553
Fitness changed from -123.75394148075384 to -128.12430198774436
Iteration 10 complete. Error: -128.12430198774436 Total: 11.7259; Orientation: 1.0605; Line Search: 8.1986
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/970b6466-01f3-445d-a56b-e6243abc159b.jpg)
Final threshold in iteration 11: -128.12430198774436 (> -Infinity) after 132.891s (< 5400.000s)
Returns
-128.12430198774436