BasicOptimizer.scala:89 executed in 132.27 seconds (2.149 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: 109085388120100
Reset training subject: 109088249436000
Adding measurement 30183725 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-39.95601178212703;dx=-1.0318041986695158E-6
New Minimum: -39.95601178212703 > -39.95601389856985
END: th(2.154434690031884)=-39.95601389856985; dx=-8.418803787034053E-7 evalInputDelta=2.1164428218867215E-6
Fitness changed from -39.95601178212703 to -39.95601389856985
Iteration 1 complete. Error: -39.95601389856985 Total: 13.4482; Orientation: 0.0666; Line Search: 5.1628
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 3f35489a to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-39.95601389856985;dx=-8.402255830462834E-7
New Minimum: -39.95601389856985 > -39.956018131455146
WOLFE (weak): th(4.641588833612779)=-39.956018131455146; dx=-8.397577697974094E-7 evalInputDelta=4.2328852956075025E-6
New Minimum: -39.956018131455146 > -39.956022364339994
WOLFE (weak): th(9.283177667225559)=-39.956022364339994; dx=-8.399420234842577E-7 evalInputDelta=8.465770143573081E-6
New Minimum: -39.956022364339994 > -39.956041412316274
WOLFE (weak): th(27.849533001676676)=-39.956041412316274; dx=-8.397837907625472E-7 evalInputDelta=2.7513746424290275E-5
New Minimum: -39.956041412316274 > -39.95611760413059
WOLFE (weak): th(111.3981320067067)=-39.95611760413059; dx=-8.395555658082985E-7 evalInputDelta=1.0370556073979742E-4
New Minimum: -39.95611760413059 > -39.95653242368193
WOLFE (weak): th(556.9906600335335)=-39.95653242368193; dx=-8.393490063996576E-7 evalInputDelta=5.185251120778389E-4
New Minimum: -39.95653242368193 > -39.95912918086931
WOLFE (weak): th(3341.9439602012008)=-39.95912918086931; dx=-8.389915128171018E-7 evalInputDelta=0.0031152822994613416
New Minimum: -39.95912918086931 > -39.97781577672255
WOLFE (weak): th(23393.607721408407)=-39.97781577672255; dx=-8.374508758533706E-7 evalInputDelta=0.021801878152700738
New Minimum: -39.97781577672255 > -40.12734088554923
WOLFE (weak): th(187148.86177126726)=-40.12734088554923; dx=-8.045495541729613E-7 evalInputDelta=0.17132698697938054
New Minimum: -40.12734088554923 > -41.322981200697384
END: th(1684339.7559414054)=-41.322981200697384; dx=-6.472260259654138E-7 evalInputDelta=1.3669673021275344
Fitness changed from -39.95601389856985 to -41.322981200697384
Iteration 2 complete. Error: -41.322981200697384 Total: 29.8791; Orientation: 0.0627; Line Search: 26.7722
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 22173fe8 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-41.322981200697384;dx=-6.35232661153651E-7
New Minimum: -41.322981200697384 > -43.39979302263021
END: th(3628800.0000000005)=-43.39979302263021; dx=-4.341544782402475E-7 evalInputDelta=2.0768118219328287
Fitness changed from -41.322981200697384 to -43.39979302263021
Iteration 3 complete. Error: -43.39979302263021 Total: 8.3666; Orientation: 0.0644; Line Search: 5.2977
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 5d196acf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.045e+03, gradient 6.666e-04, dot -0.806; [831e1a16-694e-48d8-b30c-e2e2fd75f71a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -43.39979302263021, -41.322981200697384, -39.95601389856985, -39.95601178212703
LBFGS Accumulation History: 3 points
Removed measurement 5d196acf to history. Total: 3
th(0)=-43.39979302263021;dx=-4.4350828110554887E-7
New Minimum: -43.39979302263021 > -46.4595997981975
END: th(7818012.603187701)=-46.4595997981975; dx=-2.867533501204893E-7 evalInputDelta=3.0598067755672886
Fitness changed from -43.39979302263021 to -46.4595997981975
Iteration 4 complete. Error: -46.4595997981975 Total: 9.5996; Orientation: 1.2024; Line Search: 5.2629
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 3a75a52a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.135e+04, gradient 6.139e-04, dot -0.711; [831e1a16-694e-48d8-b30c-e2e2fd75f71a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.4595997981975, -41.322981200697384, -39.95601389856985, -39.95601178212703
LBFGS Accumulation History: 3 points
Removed measurement 3a75a52a to history. Total: 3
th(0)=-46.4595997981975;dx=-3.7620848248862446E-7
New Minimum: -46.4595997981975 > -50.289174661192604
END: th(1.6843397559414055E7)=-50.289174661192604; dx=-1.2318242551598386E-7 evalInputDelta=3.829574862995102
Fitness changed from -46.4595997981975 to -50.289174661192604
Iteration 5 complete. Error: -50.289174661192604 Total: 9.5924; Orientation: 1.1388; Line Search: 5.3249
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 34841b9c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.207e+04, gradient 7.104e-04, dot -0.402; [831e1a16-694e-48d8-b30c-e2e2fd75f71a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -50.289174661192604, -41.322981200697384, -39.95601389856985, -39.95601178212703
LBFGS Accumulation History: 3 points
Removed measurement 34841b9c to history. Total: 3
th(0)=-50.289174661192604;dx=-5.042757757375438E-7
New Minimum: -50.289174661192604 > -50.67367650012899
WOLF (strong): th(3.628800000000001E7)=-50.67367650012899; dx=8.287906876646306E-8 evalInputDelta=0.38450183893638723
New Minimum: -50.67367650012899 > -52.54869847587918
WOLF (strong): th(1.8144000000000004E7)=-52.54869847587918; dx=7.19980105896744E-8 evalInputDelta=2.259523814686574
New Minimum: -52.54869847587918 > -52.606718957308146
END: th(6048000.000000001)=-52.606718957308146; dx=-1.8287385242749694E-7 evalInputDelta=2.3175442961155426
Fitness changed from -50.289174661192604 to -52.606718957308146
Iteration 6 complete. Error: -52.606718957308146 Total: 14.9091; Orientation: 1.1379; Line Search: 10.5075
Adding measurement 2223fd76 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.148e+04, gradient 5.574e-04, dot -0.634; [831e1a16-694e-48d8-b30c-e2e2fd75f71a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -52.606718957308146, -41.322981200697384, -39.95601389856985, -39.95601178212703
LBFGS Accumulation History: 3 points
Removed measurement 2223fd76 to history. Total: 3
th(0)=-52.606718957308146;dx=-3.105113759912276E-7
New Minimum: -52.606718957308146 > -54.91313239718804
END: th(1.3030021005312836E7)=-54.91313239718804; dx=-6.998950342910083E-8 evalInputDelta=2.306413439879897
Fitness changed from -52.606718957308146 to -54.91313239718804
Iteration 7 complete. Error: -54.91313239718804 Total: 9.0679; Orientation: 1.1070; Line Search: 5.1936
Adding measurement 73de872d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.243e+04, gradient 6.701e-04, dot -0.451; [831e1a16-694e-48d8-b30c-e2e2fd75f71a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.91313239718804, -41.322981200697384, -39.95601389856985, -39.95601178212703
LBFGS Accumulation History: 3 points
Removed measurement 73de872d to history. Total: 3
th(0)=-54.91313239718804;dx=-4.478662817695169E-7
New Minimum: -54.91313239718804 > -54.97808690571687
WOLF (strong): th(2.8072329265690096E7)=-54.97808690571687; dx=9.217726684396095E-8 evalInputDelta=0.06495450852882811
New Minimum: -54.97808690571687 > -56.57612273148684
WOLF (strong): th(1.4036164632845048E7)=-56.57612273148684; dx=7.600160764666708E-8 evalInputDelta=1.6629903342987973
New Minimum: -56.57612273148684 > -56.589935109504054
END: th(4678721.544281683)=-56.589935109504054; dx=-1.9004831361526917E-7 evalInputDelta=1.676802712316011
Fitness changed from -54.91313239718804 to -56.589935109504054
Iteration 8 complete. Error: -56.589935109504054 Total: 14.6275; Orientation: 1.0612; Line Search: 11.0213
Adding measurement 38570299 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.061e+04, gradient 4.865e-04, dot -0.692; [831e1a16-694e-48d8-b30c-e2e2fd75f71a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -56.589935109504054, -41.322981200697384, -39.95601389856985, -39.95601178212703
LBFGS Accumulation History: 3 points
Removed measurement 38570299 to history. Total: 3
th(0)=-56.589935109504054;dx=-2.3553659417110035E-7
New Minimum: -56.589935109504054 > -58.39687204953166
END: th(1.0080000000000004E7)=-58.39687204953166; dx=-1.16333518000385E-7 evalInputDelta=1.8069369400276045
Fitness changed from -56.589935109504054 to -58.39687204953166
Iteration 9 complete. Error: -58.39687204953166 Total: 9.5278; Orientation: 1.2282; Line Search: 5.7766
Adding measurement 755e0969 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.357e+04, gradient 5.353e-04, dot -0.594; [831e1a16-694e-48d8-b30c-e2e2fd75f71a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -58.39687204953166, -41.322981200697384, -39.95601389856985, -39.95601178212703
LBFGS Accumulation History: 3 points
Removed measurement 755e0969 to history. Total: 3
th(0)=-58.39687204953166;dx=-2.85751333208178E-7
New Minimum: -58.39687204953166 > -59.89684070043696
WOLF (strong): th(2.1716701675521396E7)=-59.89684070043696; dx=5.628451565002062E-9 evalInputDelta=1.499968650905302
END: th(1.0858350837760698E7)=-59.8914218223111; dx=-3.466431288668845E-8 evalInputDelta=1.4945497727794432
Fitness changed from -58.39687204953166 to -59.89684070043696
Iteration 10 complete. Error: -59.89684070043696 Total: 12.7714; Orientation: 1.1356; Line Search: 8.8624
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -59.89684070043696 (> -Infinity) after 132.266s (< 5400.000s)
Returns
-59.89684070043696