BasicOptimizer.scala:89 executed in 95.61 seconds (1.198 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: 284599809115700
Reset training subject: 284601815433800
Adding measurement 763b96eb to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-57.37188659557784;dx=-5.27133014040901E-6
New Minimum: -57.37188659557784 > -57.3718963958462
END: th(2.154434690031884)=-57.3718963958462; dx=-3.452379776564484E-6 evalInputDelta=9.800268358617359E-6
Fitness changed from -57.37188659557784 to -57.3718963958462
Iteration 1 complete. Error: -57.3718963958462 Total: 9.4463; Orientation: 0.0623; Line Search: 3.7420
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/78d8971c-e466-48e7-8b3c-44f09f596342.jpg)
Adding measurement 398321c3 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-57.3718963958462;dx=-3.4523857151780227E-6
New Minimum: -57.3718963958462 > -57.37191272962309
WOLFE (weak): th(4.641588833612779)=-57.37191272962309; dx=-3.452392025851494E-6 evalInputDelta=1.6333776891030993E-5
New Minimum: -57.37191272962309 > -57.37192579664125
WOLFE (weak): th(9.283177667225559)=-57.37192579664125; dx=-3.452394598649377E-6 evalInputDelta=2.9400795050094075E-5
New Minimum: -57.37192579664125 > -57.371994398437764
WOLFE (weak): th(27.849533001676676)=-57.371994398437764; dx=-3.452383326072119E-6 evalInputDelta=9.800259156378388E-5
New Minimum: -57.371994398437764 > -57.37228187174058
WOLFE (weak): th(111.3981320067067)=-57.37228187174058; dx=-3.4523080806778496E-6 evalInputDelta=3.854758943830916E-4
New Minimum: -57.37228187174058 > -57.373820482773034
WOLFE (weak): th(556.9906600335335)=-57.373820482773034; dx=-3.451960807810234E-6 evalInputDelta=0.001924086926834434
New Minimum: -57.373820482773034 > -57.38343015138062
WOLFE (weak): th(3341.9439602012008)=-57.38343015138062; dx=-3.4506991673383464E-6 evalInputDelta=0.011533755534422596
New Minimum: -57.38343015138062 > -57.4525383901792
WOLFE (weak): th(23393.607721408407)=-57.4525383901792; dx=-3.4426941114796286E-6 evalInputDelta=0.0806419943329999
New Minimum: -57.4525383901792 > -58.01138997166569
WOLFE (weak): th(187148.86177126726)=-58.01138997166569; dx=-3.381726816031788E-6 evalInputDelta=0.6394935758194933
New Minimum: -58.01138997166569 > -62.60653094430558
END: th(1684339.7559414054)=-62.60653094430558; dx=-2.738037208811799E-6 evalInputDelta=5.234634548459383
Fitness changed from -57.3718963958462 to -62.60653094430558
Iteration 2 complete. Error: -62.60653094430558 Total: 21.3397; Orientation: 0.0589; Line Search: 19.1371
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/3a03a765-e542-45d5-9f1c-37b966e7e1aa.jpg)
Adding measurement 67931351 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-62.60653094430558;dx=-2.458789913922469E-6
New Minimum: -62.60653094430558 > -69.84790218801169
END: th(3628800.0000000005)=-69.84790218801169; dx=-1.5255782838970155E-6 evalInputDelta=7.241371243706105
Fitness changed from -62.60653094430558 to -69.84790218801169
Iteration 3 complete. Error: -69.84790218801169 Total: 5.8999; Orientation: 0.0621; Line Search: 3.7034
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/291932da-e073-4ad6-b8f1-3e06f2463b45.jpg)
Adding measurement 6bc09b76 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.708e+03, gradient 1.211e-03, dot -0.768; [45beb87b-0891-48d9-a9ab-ff1299790a5a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.84790218801169, -62.60653094430558, -57.3718963958462, -57.37188659557784
LBFGS Accumulation History: 3 points
Removed measurement 6bc09b76 to history. Total: 3
th(0)=-69.84790218801169;dx=-1.4676648979804124E-6
New Minimum: -69.84790218801169 > -78.12464012667549
END: th(7818012.603187701)=-78.12464012667549; dx=-6.926886818371894E-7 evalInputDelta=8.2767379386638
Fitness changed from -69.84790218801169 to -78.12464012667549
Iteration 4 complete. Error: -78.12464012667549 Total: 7.2103; Orientation: 1.0297; Line Search: 3.7833
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/54a684e5-7f4b-4d35-9344-1c1a4a545b4f.jpg)
Adding measurement 35d77eab to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.318e+03, gradient 1.044e-03, dot -0.544; [45beb87b-0891-48d9-a9ab-ff1299790a5a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.12464012667549, -62.60653094430558, -57.3718963958462, -57.37188659557784
LBFGS Accumulation History: 3 points
Removed measurement 35d77eab to history. Total: 3
th(0)=-78.12464012667549;dx=-1.0905039948862068E-6
New Minimum: -78.12464012667549 > -85.0736507978598
END: th(1.6843397559414055E7)=-85.0736507978598; dx=-5.4785082147397554E-8 evalInputDelta=6.949010671184311
Fitness changed from -78.12464012667549 to -85.0736507978598
Iteration 5 complete. Error: -85.0736507978598 Total: 7.1104; Orientation: 0.9944; Line Search: 3.6945
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/ed7d23ae-d316-48fb-bf0f-3aa4331ff9b1.jpg)
Adding measurement 24a053d3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.571e+03, gradient 1.277e-03, dot -0.210; [45beb87b-0891-48d9-a9ab-ff1299790a5a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -85.0736507978598, -62.60653094430558, -57.3718963958462, -57.37188659557784
LBFGS Accumulation History: 3 points
Removed measurement 24a053d3 to history. Total: 3
th(0)=-85.0736507978598;dx=-1.6311615581910672E-6
Armijo: th(3.628800000000001E7)=-79.14996789610109; dx=3.94869257713556E-7 evalInputDelta=-5.92368290175871
New Minimum: -85.0736507978598 > -87.99131471169979
WOLF (strong): th(1.8144000000000004E7)=-87.99131471169979; dx=5.56137240438343E-7 evalInputDelta=2.917663913839988
New Minimum: -87.99131471169979 > -91.40987013682575
END: th(6048000.000000001)=-91.40987013682575; dx=-4.112317606573391E-7 evalInputDelta=6.336219338965947
Fitness changed from -85.0736507978598 to -91.40987013682575
Iteration 6 complete. Error: -91.40987013682575 Total: 11.1668; Orientation: 0.9576; Line Search: 7.8186
Adding measurement 6e202f30 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.587e+04, gradient 8.479e-04, dot -0.500; [45beb87b-0891-48d9-a9ab-ff1299790a5a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.40987013682575, -62.60653094430558, -57.3718963958462, -57.37188659557784
LBFGS Accumulation History: 3 points
Removed measurement 6e202f30 to history. Total: 3
th(0)=-91.40987013682575;dx=-7.189042649404071E-7
New Minimum: -91.40987013682575 > -96.04432794727293
END: th(1.3030021005312836E7)=-96.04432794727293; dx=-8.112513623757019E-8 evalInputDelta=4.634457810447188
Fitness changed from -91.40987013682575 to -96.04432794727293
Iteration 7 complete. Error: -96.04432794727293 Total: 6.8727; Orientation: 1.1197; Line Search: 3.8780
Adding measurement 5e4e4e25 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.789e+04, gradient 1.004e-03, dot -0.363; [45beb87b-0891-48d9-a9ab-ff1299790a5a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -96.04432794727293, -62.60653094430558, -57.3718963958462, -57.37188659557784
LBFGS Accumulation History: 3 points
Removed measurement 5e4e4e25 to history. Total: 3
th(0)=-96.04432794727293;dx=-1.0081270609762949E-6
Armijo: th(2.8072329265690096E7)=-93.6894761852887; dx=3.300452565884729E-7 evalInputDelta=-2.3548517619842357
New Minimum: -96.04432794727293 > -98.62261344530319
WOLF (strong): th(1.4036164632845048E7)=-98.62261344530319; dx=3.148637150439691E-7 evalInputDelta=2.5782854980302545
New Minimum: -98.62261344530319 > -99.31996499220803
END: th(4678721.544281683)=-99.31996499220803; dx=-3.6718854531183307E-7 evalInputDelta=3.2756370449350953
Fitness changed from -96.04432794727293 to -99.31996499220803
Iteration 8 complete. Error: -99.31996499220803 Total: 10.6411; Orientation: 1.0226; Line Search: 7.7720
Adding measurement 6281a52e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.322e+04, gradient 6.735e-04, dot -0.615; [45beb87b-0891-48d9-a9ab-ff1299790a5a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -99.31996499220803, -62.60653094430558, -57.3718963958462, -57.37188659557784
LBFGS Accumulation History: 3 points
Removed measurement 6281a52e to history. Total: 3
th(0)=-99.31996499220803;dx=-4.5354731675663435E-7
New Minimum: -99.31996499220803 > -102.64316407258832
END: th(1.0080000000000004E7)=-102.64316407258832; dx=-2.282310313844455E-7 evalInputDelta=3.3231990803802915
Fitness changed from -99.31996499220803 to -102.64316407258832
Iteration 9 complete. Error: -102.64316407258832 Total: 6.8527; Orientation: 1.0159; Line Search: 4.0033
Adding measurement 6a18c786 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.512e+04, gradient 7.210e-04, dot -0.535; [45beb87b-0891-48d9-a9ab-ff1299790a5a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -102.64316407258832, -62.60653094430558, -57.3718963958462, -57.37188659557784
LBFGS Accumulation History: 3 points
Removed measurement 6a18c786 to history. Total: 3
th(0)=-102.64316407258832;dx=-5.198001785584289E-7
New Minimum: -102.64316407258832 > -105.2417098092718
WOLF (strong): th(2.1716701675521396E7)=-105.2417098092718; dx=5.796533762906983E-8 evalInputDelta=2.5985457366834765
New Minimum: -105.2417098092718 > -105.35840137709815
END: th(1.0858350837760698E7)=-105.35840137709815; dx=-6.20643748750373E-8 evalInputDelta=2.7152373045098273
Fitness changed from -102.64316407258832 to -105.35840137709815
Iteration 10 complete. Error: -105.35840137709815 Total: 8.7160; Orientation: 1.0157; Line Search: 5.8443
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/4d58ee71-2066-48a1-87e2-a951f71934e2.jpg)
Final threshold in iteration 11: -105.35840137709815 (> -Infinity) after 95.614s (< 5400.000s)
Returns
-105.35840137709815