BasicOptimizer.scala:89 executed in 96.72 seconds (1.340 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: 283709346325100
Reset training subject: 283711249350700
Adding measurement 416ebd0e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-49.507478033637334;dx=-4.736686740677953E-6
New Minimum: -49.507478033637334 > -49.50748560501729
END: th(2.154434690031884)=-49.50748560501729; dx=-3.561778403244006E-6 evalInputDelta=7.571379953219548E-6
Fitness changed from -49.507478033637334 to -49.50748560501729
Iteration 1 complete. Error: -49.50748560501729 Total: 9.2984; Orientation: 0.0615; Line Search: 3.6077
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/11109163-571f-4653-b67c-2411ca6033bf.jpg)
Adding measurement 6741cd19 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-49.50748560501729;dx=-3.5617775481240355E-6
New Minimum: -49.50748560501729 > -49.50750264061795
WOLFE (weak): th(4.641588833612779)=-49.50750264061795; dx=-3.561772681118885E-6 evalInputDelta=1.703560066346199E-5
New Minimum: -49.50750264061795 > -49.50751967621275
WOLFE (weak): th(9.283177667225559)=-49.50751967621275; dx=-3.5617706839494663E-6 evalInputDelta=3.407119546494641E-5
New Minimum: -49.50751967621275 > -49.50758403285133
WOLFE (weak): th(27.849533001676676)=-49.50758403285133; dx=-3.561776268102323E-6 evalInputDelta=9.84278340396827E-5
New Minimum: -49.50758403285133 > -49.50788499366836
WOLFE (weak): th(111.3981320067067)=-49.50788499366836; dx=-3.561773082630321E-6 evalInputDelta=3.9938865107558286E-4
New Minimum: -49.50788499366836 > -49.50947115944205
WOLFE (weak): th(556.9906600335335)=-49.50947115944205; dx=-3.5618400220274045E-6 evalInputDelta=0.001985554424763336
New Minimum: -49.50947115944205 > -49.51938827541071
WOLFE (weak): th(3341.9439602012008)=-49.51938827541071; dx=-3.5604039224144264E-6 evalInputDelta=0.011902670393425296
New Minimum: -49.51938827541071 > -49.590680055137184
WOLFE (weak): th(23393.607721408407)=-49.590680055137184; dx=-3.550511458946427E-6 evalInputDelta=0.08319445011989757
New Minimum: -49.590680055137184 > -50.1665540481125
WOLFE (weak): th(187148.86177126726)=-50.1665540481125; dx=-3.48146437364565E-6 evalInputDelta=0.6590684430952152
New Minimum: -50.1665540481125 > -54.80137529780705
END: th(1684339.7559414054)=-54.80137529780705; dx=-2.693706842008261E-6 evalInputDelta=5.293889692789762
Fitness changed from -49.50748560501729 to -54.80137529780705
Iteration 2 complete. Error: -54.80137529780705 Total: 21.0383; Orientation: 0.0583; Line Search: 18.8520
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d910442b-c556-445e-840f-60bd3315d287.jpg)
Adding measurement 5848d023 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-54.80137529780705;dx=-2.3950589834945064E-6
New Minimum: -54.80137529780705 > -61.73176780790713
END: th(3628800.0000000005)=-61.73176780790713; dx=-1.423194374260989E-6 evalInputDelta=6.930392510100084
Fitness changed from -54.80137529780705 to -61.73176780790713
Iteration 3 complete. Error: -61.73176780790713 Total: 6.2175; Orientation: 0.0579; Line Search: 3.8107
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/11d75742-fb72-4dc7-9c3e-cdc789739102.jpg)
Adding measurement 2abacc14 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.285e+03, gradient 1.199e-03, dot -0.736; [7cc7b08d-9480-457e-875a-535d826b1328 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.73176780790713, -54.80137529780705, -49.50748560501729, -49.507478033637334
LBFGS Accumulation History: 3 points
Removed measurement 2abacc14 to history. Total: 3
th(0)=-61.73176780790713;dx=-1.437278314769463E-6
New Minimum: -61.73176780790713 > -69.53693674226906
END: th(7818012.603187701)=-69.53693674226906; dx=-6.305507197560174E-7 evalInputDelta=7.80516893436193
Fitness changed from -61.73176780790713 to -69.53693674226906
Iteration 4 complete. Error: -69.53693674226906 Total: 7.2139; Orientation: 1.0601; Line Search: 3.6365
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ec4136f9-c0a5-4618-8150-1abf2afecc7f.jpg)
Adding measurement 10ab0cf8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.091e+03, gradient 1.125e-03, dot -0.500; [7cc7b08d-9480-457e-875a-535d826b1328 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.53693674226906, -54.80137529780705, -49.50748560501729, -49.507478033637334
LBFGS Accumulation History: 3 points
Removed measurement 10ab0cf8 to history. Total: 3
th(0)=-69.53693674226906;dx=-1.2647835831507126E-6
New Minimum: -69.53693674226906 > -74.77081123431297
WOLF (strong): th(1.6843397559414055E7)=-74.77081123431297; dx=8.96809303677464E-8 evalInputDelta=5.23387449204391
END: th(8421698.779707028)=-74.68228111064928; dx=-1.673409083878343E-7 evalInputDelta=5.145344368380222
Fitness changed from -69.53693674226906 to -74.77081123431297
Iteration 5 complete. Error: -74.77081123431297 Total: 9.2039; Orientation: 1.0276; Line Search: 5.7493
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/773805a0-c845-4c16-a6f3-adbe37021429.jpg)
Adding measurement 64acc522 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.599e+03, gradient 1.487e-03, dot -0.158; [7cc7b08d-9480-457e-875a-535d826b1328 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -74.77081123431297, -54.80137529780705, -49.50748560501729, -49.507478033637334
LBFGS Accumulation History: 3 points
Removed measurement 64acc522 to history. Total: 3
th(0)=-74.77081123431297;dx=-2.2122165047364226E-6
New Minimum: -74.77081123431297 > -77.0130518170886
WOLF (strong): th(1.8144000000000004E7)=-77.0130518170886; dx=8.429409121137724E-7 evalInputDelta=2.242240582775622
New Minimum: -77.0130518170886 > -83.40485060844654
WOLF (strong): th(9072000.000000002)=-83.40485060844654; dx=2.6993127207496325E-7 evalInputDelta=8.634039374133565
END: th(3024000.0000000005)=-80.33976068346928; dx=-1.4210935493022633E-6 evalInputDelta=5.568949449156307
Fitness changed from -74.77081123431297 to -83.40485060844654
Iteration 6 complete. Error: -83.40485060844654 Total: 10.8108; Orientation: 1.0024; Line Search: 7.6342
Adding measurement 65c97e22 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.561e+04, gradient 1.209e-03, dot -0.304; [7cc7b08d-9480-457e-875a-535d826b1328 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -83.40485060844654, -54.80137529780705, -49.50748560501729, -49.507478033637334
LBFGS Accumulation History: 3 points
Removed measurement 65c97e22 to history. Total: 3
th(0)=-83.40485060844654;dx=-1.4610525188009004E-6
New Minimum: -83.40485060844654 > -88.62329861602662
END: th(6515010.502656418)=-88.62329861602662; dx=-1.2053169778059306E-7 evalInputDelta=5.218448007580079
Fitness changed from -83.40485060844654 to -88.62329861602662
Iteration 7 complete. Error: -88.62329861602662 Total: 6.6840; Orientation: 0.9513; Line Search: 3.7799
Adding measurement 5d0ac639 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.399e+04, gradient 9.026e-04, dot -0.503; [7cc7b08d-9480-457e-875a-535d826b1328 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -88.62329861602662, -54.80137529780705, -49.50748560501729, -49.507478033637334
LBFGS Accumulation History: 3 points
Removed measurement 5d0ac639 to history. Total: 3
th(0)=-88.62329861602662;dx=-8.147203737417227E-7
New Minimum: -88.62329861602662 > -92.06619326960949
WOLF (strong): th(1.4036164632845048E7)=-92.06619326960949; dx=1.2065545124076534E-7 evalInputDelta=3.4428946535828686
END: th(7018082.316422524)=-92.031257946426; dx=-1.829281234264734E-7 evalInputDelta=3.407959330399379
Fitness changed from -88.62329861602662 to -92.06619326960949
Iteration 8 complete. Error: -92.06619326960949 Total: 8.6910; Orientation: 0.9605; Line Search: 5.6834
Adding measurement d09521c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.299e+04, gradient 1.236e-03, dot -0.284; [7cc7b08d-9480-457e-875a-535d826b1328 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -92.06619326960949, -54.80137529780705, -49.50748560501729, -49.507478033637334
LBFGS Accumulation History: 3 points
Removed measurement d09521c to history. Total: 3
th(0)=-92.06619326960949;dx=-1.5288804528438156E-6
New Minimum: -92.06619326960949 > -93.33571099712353
WOLF (strong): th(1.5120000000000006E7)=-93.33571099712353; dx=7.38539076391868E-7 evalInputDelta=1.2695177275140423
New Minimum: -93.33571099712353 > -97.52469088503109
WOLF (strong): th(7560000.000000003)=-97.52469088503109; dx=1.5042327534066221E-7 evalInputDelta=5.4584976154216065
END: th(2520000.000000001)=-95.34622162626913; dx=-1.0492299691032574E-6 evalInputDelta=3.280028356659642
Fitness changed from -92.06619326960949 to -97.52469088503109
Iteration 9 complete. Error: -97.52469088503109 Total: 10.4232; Orientation: 1.0016; Line Search: 7.5888
Adding measurement 20bf4714 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.119e+04, gradient 8.966e-04, dot -0.448; [7cc7b08d-9480-457e-875a-535d826b1328 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -97.52469088503109, -54.80137529780705, -49.50748560501729, -49.507478033637334
LBFGS Accumulation History: 3 points
Removed measurement 20bf4714 to history. Total: 3
th(0)=-97.52469088503109;dx=-8.038799457621747E-7
New Minimum: -97.52469088503109 > -100.35565952087998
END: th(5429175.418880349)=-100.35565952087998; dx=-2.342604836946977E-7 evalInputDelta=2.8309686358488904
Fitness changed from -97.52469088503109 to -100.35565952087998
Iteration 10 complete. Error: -100.35565952087998 Total: 6.7991; Orientation: 0.9457; Line Search: 3.7526
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1c15b6d9-311b-402f-8b8c-2cbbdd96ba56.jpg)
Final threshold in iteration 11: -100.35565952087998 (> -Infinity) after 96.723s (< 5400.000s)
Returns
-100.35565952087998