Code from BasicOptimizer.scala:75 executed in 3727.09 seconds (22.701 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
IterativeTrainer.wrap(trainable)
.setOrientation(orientation())
.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = trainingMonitor.log(msg)
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(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, currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
.setTimeout(trainingMinutes, TimeUnit.MINUTES)
.setMaxIterations(trainingIterations)
.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
.runAndFree
.asInstanceOf[lang.Double]
Reset training subject: 1291775118406300
Reset training subject: 1291826725375800
Adding measurement 6057ae80 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=1.373282019218328;dx=-3.303684839592504E-7
New Minimum: 1.373282019218328 > 1.3732817340808838
WOLFE (weak): th(2.154434690031884)=1.3732817340808838; dx=-3.25027793194901E-7 evalInputDelta=2.8513744410041397E-7
New Minimum: 1.3732817340808838 > 1.3732814651489371
WOLFE (weak): th(4.308869380063768)=1.3732814651489371; dx=-3.250281709334002E-7 evalInputDelta=5.540693908123728E-7
New Minimum: 1.3732814651489371 > 1.3732805243015231
WOLFE (weak): th(12.926608140191302)=1.3732805243015231; dx=-3.2502657074358936E-7 evalInputDelta=1.4949168047895256E-6
New Minimum: 1.3732805243015231 > 1.373276116569941
WOLFE (weak): th(51.70643256076521)=1.373276116569941; dx=-3.2502564589330336E-7 evalInputDelta=5.90264838695731E-6
New Minimum: 1.373276116569941 > 1.373252664392099
WOLFE (weak): th(258.53216280382605)=1.373252664392099; dx=-3.250170415975177E-7 evalInputDelta=2.9354826228900066E-5
New Minimum: 1.373252664392099 > 1.373105326295807
WOLFE (weak): th(1551.1929768229563)=1.373105326295807; dx=-3.24989753290148E-7 evalInputDelta=1.7669292252087132E-4
New Minimum: 1.373105326295807 > 1.3720452935874903
WOLFE (weak): th(10858.350837760694)=1.3720452935874903; dx=-3.247915258010134E-7 evalInputDelta=0.001236725630837654
New Minimum: 1.3720452935874903 > 1.3634388503285022
WOLFE (weak): th(86866.80670208555)=1.3634388503285022; dx=-3.2280413475713916E-7 evalInputDelta=0.009843168889825726
New Minimum: 1.3634388503285022 > 1.2887452797725287
WOLFE (weak): th(781801.26031877)=1.2887452797725287; dx=-3.0474535858452984E-7 evalInputDelta=0.0845367394457992
New Minimum: 1.2887452797725287 > 0.883022420813974
END: th(7818012.6031877)=0.883022420813974; dx=-1.5888545885108981E-7 evalInputDelta=0.49025959840435396
Fitness changed from 1.373282019218328 to 0.883022420813974
Iteration 1 comp
...skipping 11031 bytes...
ory. Total: 3
Rejected: LBFGS Orientation magnitude: 1.679e+04, gradient 1.319e-04, dot -0.867; [00b9eb4e-5e38-4ac2-9e36-8c93be2ba5c1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.05687203573851485, 0.03817279209552882, -0.021620946620344972, -0.06027382676971205
LBFGS Accumulation History: 3 points
Removed measurement 12305a5b to history. Total: 4
th(0)=-0.06027382676971205;dx=-1.740324635175566E-8
Armijo: th(3.655251206470066E7)=-0.05162321833718453; dx=-7.566524939373423E-9 evalInputDelta=-0.008650608432527518
New Minimum: -0.06027382676971205 > -0.09324195536474589
END: th(1.827625603235033E7)=-0.09324195536474589; dx=-1.0570092444548208E-8 evalInputDelta=0.03296812859503384
Fitness changed from -0.06027382676971205 to -0.09324195536474589
Iteration 14 complete. Error: -0.09324195536474589 Total: 217.4597; Orientation: 1.5324; Line Search: 161.3554
Adding measurement 3246016 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.212e+03, gradient 1.228e-04, dot -0.842; [00b9eb4e-5e38-4ac2-9e36-8c93be2ba5c1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.03817279209552882, -0.021620946620344972, -0.06027382676971205, -0.09324195536474589
LBFGS Accumulation History: 3 points
Removed measurement 4da92392 to history. Total: 4
th(0)=-0.09324195536474589;dx=-1.5090664633500532E-8
Armijo: th(3.937500000000003E7)=-0.04665640877398869; dx=-3.781747467484524E-9 evalInputDelta=-0.0465855465907572
New Minimum: -0.09324195536474589 > -0.11651736499480503
END: th(1.9687500000000015E7)=-0.11651736499480503; dx=-7.944441759735953E-9 evalInputDelta=0.02327540963005914
Fitness changed from -0.09324195536474589 to -0.11651736499480503
Iteration 15 complete. Error: -0.11651736499480503 Total: 218.6377; Orientation: 1.4792; Line Search: 162.2053
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/b960b969-3e3e-4c2a-b1a7-e1e08b1b4f8f.jpg)
Final threshold in iteration 15: -0.11651736499480503 (> -Infinity) after 3727.083s (< 3600.000s)
-0.11651736499480503