BasicOptimizer.scala:89 executed in 135.29 seconds (1.692 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: 72412960668200
Reset training subject: 72415658663500
Adding measurement 484930bc to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-20.81595320501311;dx=-7.365595295545018E-7
New Minimum: -20.81595320501311 > -20.815954445106076
END: th(2.154434690031884)=-20.815954445106076; dx=-5.316983754124693E-7 evalInputDelta=1.2400929669809102E-6
Fitness changed from -20.81595320501311 to -20.815954445106076
Iteration 1 complete. Error: -20.815954445106076 Total: 13.1531; Orientation: 0.0588; Line Search: 5.1545
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 577fc681 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-20.815954445106076;dx=-5.303132881066685E-7
New Minimum: -20.815954445106076 > -20.815958165384547
WOLFE (weak): th(4.641588833612779)=-20.815958165384547; dx=-5.297380773195728E-7 evalInputDelta=3.7202784710643755E-6
New Minimum: -20.815958165384547 > -20.81596188566235
WOLFE (weak): th(9.283177667225559)=-20.81596188566235; dx=-5.293763514450699E-7 evalInputDelta=7.440556274218579E-6
New Minimum: -20.81596188566235 > -20.81597304649177
WOLFE (weak): th(27.849533001676676)=-20.81597304649177; dx=-5.291571646597927E-7 evalInputDelta=1.860138569398373E-5
New Minimum: -20.81597304649177 > -20.816020169927796
WOLFE (weak): th(111.3981320067067)=-20.816020169927796; dx=-5.288649721689275E-7 evalInputDelta=6.572482172018113E-5
New Minimum: -20.816020169927796 > -20.8162830671395
WOLFE (weak): th(556.9906600335335)=-20.8162830671395; dx=-5.288466035007374E-7 evalInputDelta=3.286220334253187E-4
New Minimum: -20.8162830671395 > -20.81791245975971
WOLFE (weak): th(3341.9439602012008)=-20.81791245975971; dx=-5.287262989821324E-7 evalInputDelta=0.0019580146536348764
New Minimum: -20.81791245975971 > -20.829624461276403
WOLFE (weak): th(23393.607721408407)=-20.829624461276403; dx=-5.275688978460845E-7 evalInputDelta=0.013670016170326704
New Minimum: -20.829624461276403 > -20.92427868961231
WOLFE (weak): th(187148.86177126726)=-20.92427868961231; dx=-5.16776076184107E-7 evalInputDelta=0.10832424450623535
New Minimum: -20.92427868961231 > -21.631787942910616
END: th(1684339.7559414054)=-21.631787942910616; dx=-3.0594056609164885E-7 evalInputDelta=0.8158334978045403
Fitness changed from -20.815954445106076 to -21.631787942910616
Iteration 2 complete. Error: -21.631787942910616 Total: 29.4447; Orientation: 0.0584; Line Search: 26.4795
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 700a2a33 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-21.631787942910616;dx=-4.2664259637529495E-7
New Minimum: -21.631787942910616 > -22.575791419701112
END: th(3628800.0000000005)=-22.575791419701112; dx=-1.2798494951172865E-7 evalInputDelta=0.9440034767904955
Fitness changed from -21.631787942910616 to -22.575791419701112
Iteration 3 complete. Error: -22.575791419701112 Total: 8.4077; Orientation: 0.0530; Line Search: 5.1410
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 5f55a4ea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.608e+03, gradient 6.725e-04, dot -0.416; [467d3247-9445-410b-b793-a320a0dfa9dd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -22.575791419701112, -21.631787942910616, -20.815954445106076, -20.81595320501311
LBFGS Accumulation History: 3 points
Removed measurement 5f55a4ea to history. Total: 3
th(0)=-22.575791419701112;dx=-4.517705255357993E-7
New Minimum: -22.575791419701112 > -23.41965359256558
END: th(7818012.603187701)=-23.41965359256558; dx=-1.857778796204221E-8 evalInputDelta=0.8438621728644691
Fitness changed from -22.575791419701112 to -23.41965359256558
Iteration 4 complete. Error: -23.41965359256558 Total: 9.1368; Orientation: 1.0411; Line Search: 5.1729
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 4a4489f9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.005e+03, gradient 6.778e-04, dot -0.240; [467d3247-9445-410b-b793-a320a0dfa9dd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -23.41965359256558, -21.631787942910616, -20.815954445106076, -20.81595320501311
LBFGS Accumulation History: 3 points
Removed measurement 4a4489f9 to history. Total: 3
th(0)=-23.41965359256558;dx=-4.5925445519921294E-7
New Minimum: -23.41965359256558 > -24.538011481564073
WOLF (strong): th(1.6843397559414055E7)=-24.538011481564073; dx=2.1513259534043833E-8 evalInputDelta=1.1183578889984922
New Minimum: -24.538011481564073 > -24.92000510963155
WOLF (strong): th(8421698.779707028)=-24.92000510963155; dx=3.9621523182341774E-8 evalInputDelta=1.500351517065969
END: th(2807232.926569009)=-24.590268094933382; dx=-2.5325961399601737E-7 evalInputDelta=1.1706145023678012
Fitness changed from -23.41965359256558 to -24.92000510963155
Iteration 5 complete. Error: -24.92000510963155 Total: 14.5112; Orientation: 0.9869; Line Search: 10.4947
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement e1e632a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.903e+03, gradient 7.021e-04, dot -0.270; [467d3247-9445-410b-b793-a320a0dfa9dd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -24.92000510963155, -21.631787942910616, -20.815954445106076, -20.81595320501311
LBFGS Accumulation History: 3 points
Removed measurement e1e632a to history. Total: 3
th(0)=-24.92000510963155;dx=-4.926614316561277E-7
New Minimum: -24.92000510963155 > -26.514218356422845
WOLF (strong): th(6048000.000000001)=-26.514218356422845; dx=5.857585564737195E-8 evalInputDelta=1.5942132467912948
END: th(3024000.0000000005)=-26.270775675595228; dx=-2.519094627382681E-7 evalInputDelta=1.3507705659636784
Fitness changed from -24.92000510963155 to -26.514218356422845
Iteration 6 complete. Error: -26.514218356422845 Total: 11.8996; Orientation: 0.9745; Line Search: 7.7747
Adding measurement 61510023 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.399e+04, gradient 6.640e-04, dot -0.372; [467d3247-9445-410b-b793-a320a0dfa9dd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -26.514218356422845, -21.631787942910616, -20.815954445106076, -20.81595320501311
LBFGS Accumulation History: 3 points
Removed measurement 61510023 to history. Total: 3
th(0)=-26.514218356422845;dx=-4.405880794353641E-7
New Minimum: -26.514218356422845 > -27.17562362655917
WOLF (strong): th(6515010.502656418)=-27.17562362655917; dx=1.368554836967316E-7 evalInputDelta=0.6614052701363242
New Minimum: -27.17562362655917 > -27.49407890977535
END: th(3257505.251328209)=-27.49407890977535; dx=-3.9606231782904965E-8 evalInputDelta=0.9798605533525055
Fitness changed from -26.514218356422845 to -27.49407890977535
Iteration 7 complete. Error: -27.49407890977535 Total: 11.4317; Orientation: 0.9493; Line Search: 7.9421
Adding measurement 333724d2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.382e+04, gradient 5.275e-04, dot -0.561; [467d3247-9445-410b-b793-a320a0dfa9dd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -27.49407890977535, -21.631787942910616, -20.815954445106076, -20.81595320501311
LBFGS Accumulation History: 3 points
Removed measurement 333724d2 to history. Total: 3
th(0)=-27.49407890977535;dx=-2.781833109014754E-7
New Minimum: -27.49407890977535 > -27.858348362605366
WOLF (strong): th(7018082.316422524)=-27.858348362605366; dx=3.142554218451112E-8 evalInputDelta=0.36426945283001544
New Minimum: -27.858348362605366 > -27.968534657137305
WOLF (strong): th(3509041.158211262)=-27.968534657137305; dx=1.4727064823765275E-9 evalInputDelta=0.4744557473619544
END: th(1169680.3860704207)=-27.793804039807927; dx=-1.756767989216302E-7 evalInputDelta=0.29972513003257717
Fitness changed from -27.49407890977535 to -27.968534657137305
Iteration 8 complete. Error: -27.968534657137305 Total: 14.0037; Orientation: 1.0055; Line Search: 10.4950
Adding measurement 4e8d24ab to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.377e+04, gradient 5.847e-04, dot -0.482; [467d3247-9445-410b-b793-a320a0dfa9dd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -27.968534657137305, -21.631787942910616, -20.815954445106076, -20.81595320501311
LBFGS Accumulation History: 3 points
Removed measurement 4e8d24ab to history. Total: 3
th(0)=-27.968534657137305;dx=-3.418552338220158E-7
New Minimum: -27.968534657137305 > -28.474357900976102
WOLF (strong): th(2520000.000000001)=-28.474357900976102; dx=9.298847507168925E-9 evalInputDelta=0.5058232438387975
END: th(1260000.0000000005)=-28.36013885181536; dx=-1.9700231011255902E-7 evalInputDelta=0.39160419467805596
Fitness changed from -27.968534657137305 to -28.474357900976102
Iteration 9 complete. Error: -28.474357900976102 Total: 11.5344; Orientation: 1.0101; Line Search: 8.0372
Adding measurement 302c8455 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.887e+04, gradient 5.180e-04, dot -0.568; [467d3247-9445-410b-b793-a320a0dfa9dd = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.474357900976102, -21.631787942910616, -20.815954445106076, -20.81595320501311
LBFGS Accumulation History: 3 points
Removed measurement 302c8455 to history. Total: 3
th(0)=-28.474357900976102;dx=-2.681474071232985E-7
New Minimum: -28.474357900976102 > -28.827832845959616
WOLF (strong): th(2714587.7094401745)=-28.827832845959616; dx=8.18409040949498E-9 evalInputDelta=0.35347494498351395
END: th(1357293.8547200873)=-28.769579961386498; dx=-1.0996004062735355E-7 evalInputDelta=0.29522206041039567
Fitness changed from -28.474357900976102 to -28.827832845959616
Iteration 10 complete. Error: -28.827832845959616 Total: 11.3248; Orientation: 1.0023; Line Search: 7.8049
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -28.827832845959616 (> -Infinity) after 135.287s (< 5400.000s)
Returns
-28.827832845959616