BasicOptimizer.scala:89 executed in 302.64 seconds (3.387 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: 649355287299700
Reset training subject: 649361228977800
Adding measurement 1b7592cc to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-36.5144644181132;dx=-1.827940413700881E-6
New Minimum: -36.5144644181132 > -36.51446648653319
END: th(2.154434690031884)=-36.51446648653319; dx=-1.6120942182155625E-6 evalInputDelta=2.0684199881770837E-6
Fitness changed from -36.5144644181132 to -36.51446648653319
Iteration 1 complete. Error: -36.51446648653319 Total: 29.2968; Orientation: 0.1553; Line Search: 11.5275
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7a07cd85-443d-4c5b-ba42-614af9050672.jpg)
Adding measurement 42e7a062 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-36.51446648653319;dx=-1.6088550605862124E-6
New Minimum: -36.51446648653319 > -36.514476828631366
WOLFE (weak): th(4.641588833612779)=-36.514476828631366; dx=-1.6088982095202423E-6 evalInputDelta=1.0342098178739434E-5
New Minimum: -36.514476828631366 > -36.514483033888865
WOLFE (weak): th(9.283177667225559)=-36.514483033888865; dx=-1.6082795240352433E-6 evalInputDelta=1.6547355677687392E-5
New Minimum: -36.514483033888865 > -36.514518196994786
WOLFE (weak): th(27.849533001676676)=-36.514518196994786; dx=-1.6077499310337342E-6 evalInputDelta=5.1710461598020174E-5
New Minimum: -36.514518196994786 > -36.514669191123566
WOLFE (weak): th(111.3981320067067)=-36.514669191123566; dx=-1.6075581929383563E-6 evalInputDelta=2.027045903787439E-4
New Minimum: -36.514669191123566 > -36.51546758805532
WOLFE (weak): th(556.9906600335335)=-36.51546758805532; dx=-1.6066672016452864E-6 evalInputDelta=0.0010011015221351727
New Minimum: -36.51546758805532 > -36.52046027555152
WOLFE (weak): th(3341.9439602012008)=-36.52046027555152; dx=-1.6065797682991202E-6 evalInputDelta=0.005993789018333473
New Minimum: -36.52046027555152 > -36.556375513465795
WOLFE (weak): th(23393.607721408407)=-36.556375513465795; dx=-1.6043116555123764E-6 evalInputDelta=0.041909026932607674
New Minimum: -36.556375513465795 > -36.84767442426954
WOLFE (weak): th(187148.86177126726)=-36.84767442426954; dx=-1.5839553332092227E-6 evalInputDelta=0.33320793773635415
New Minimum: -36.84767442426954 > -39.30687527272298
END: th(1684339.7559414054)=-39.30687527272298; dx=-1.3511596102808987E-6 evalInputDelta=2.792408786189796
Fitness changed from -36.51446648653319 to -39.30687527272298
Iteration 2 complete. Error: -39.30687527272298 Total: 68.9818; Orientation: 0.1350; Line Search: 61.3061
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6e8c8848-becf-43b7-b699-e96e38c77c13.jpg)
Adding measurement 5b58541d to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-39.30687527272298;dx=-1.2727299011379345E-6
New Minimum: -39.30687527272298 > -43.497564630574345
END: th(3628800.0000000005)=-43.497564630574345; dx=-8.260544505706387E-7 evalInputDelta=4.190689357851362
Fitness changed from -39.30687527272298 to -43.497564630574345
Iteration 3 complete. Error: -43.497564630574345 Total: 20.2194; Orientation: 0.1529; Line Search: 12.7244
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/25612180-f1fe-4ceb-b2a0-7f5131a6ba95.jpg)
Adding measurement 7659e50c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.386e+03, gradient 8.916e-04, dot -0.788; [3c9cdcc2-e4e3-4f3d-9bc3-f38c58066000 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -43.497564630574345, -39.30687527272298, -36.51446648653319, -36.5144644181132
LBFGS Accumulation History: 3 points
Removed measurement 7659e50c to history. Total: 3
th(0)=-43.497564630574345;dx=-7.940389000507226E-7
New Minimum: -43.497564630574345 > -48.73003200793706
END: th(7818012.603187701)=-48.73003200793706; dx=-4.3439083433024493E-7 evalInputDelta=5.232467377362717
Fitness changed from -43.497564630574345 to -48.73003200793706
Iteration 4 complete. Error: -48.73003200793706 Total: 21.6386; Orientation: 2.6580; Line Search: 11.9902
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/dcd044d4-bce6-4785-83dd-d32a73f8f042.jpg)
Adding measurement 57055263 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.530e+03, gradient 7.950e-04, dot -0.593; [3c9cdcc2-e4e3-4f3d-9bc3-f38c58066000 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.73003200793706, -39.30687527272298, -36.51446648653319, -36.5144644181132
LBFGS Accumulation History: 3 points
Removed measurement 57055263 to history. Total: 3
th(0)=-48.73003200793706;dx=-6.302107987929887E-7
New Minimum: -48.73003200793706 > -54.2068940793485
END: th(1.6843397559414055E7)=-54.2068940793485; dx=-1.2502828234552535E-7 evalInputDelta=5.476862071411439
Fitness changed from -48.73003200793706 to -54.2068940793485
Iteration 5 complete. Error: -54.2068940793485 Total: 21.5206; Orientation: 2.4833; Line Search: 12.0333
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/e0a8054f-aab2-403a-b969-b1b8873f03a4.jpg)
Adding measurement 69bcb666 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.113e+04, gradient 9.906e-04, dot -0.323; [3c9cdcc2-e4e3-4f3d-9bc3-f38c58066000 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.2068940793485, -39.30687527272298, -36.51446648653319, -36.5144644181132
LBFGS Accumulation History: 3 points
Removed measurement 69bcb666 to history. Total: 3
th(0)=-54.2068940793485;dx=-9.808589052640114E-7
Armijo: th(3.628800000000001E7)=-51.32391221411815; dx=2.0270576526368065E-7 evalInputDelta=-2.8829818652303487
New Minimum: -54.2068940793485 > -56.80878196805836
WOLF (strong): th(1.8144000000000004E7)=-56.80878196805836; dx=2.818914275731416E-7 evalInputDelta=2.601887888709861
New Minimum: -56.80878196805836 > -58.60611422440094
END: th(6048000.000000001)=-58.60611422440094; dx=-2.8765365062463726E-7 evalInputDelta=4.399220145052439
Fitness changed from -54.2068940793485 to -58.60611422440094
Iteration 6 complete. Error: -58.60611422440094 Total: 34.2403; Orientation: 2.7058; Line Search: 24.1260
Adding measurement 51ee7371 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.102e+04, gradient 7.032e-04, dot -0.610; [3c9cdcc2-e4e3-4f3d-9bc3-f38c58066000 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -58.60611422440094, -39.30687527272298, -36.51446648653319, -36.5144644181132
LBFGS Accumulation History: 3 points
Removed measurement 51ee7371 to history. Total: 3
th(0)=-58.60611422440094;dx=-4.938941678256577E-7
New Minimum: -58.60611422440094 > -62.59461452954617
END: th(1.3030021005312836E7)=-62.59461452954617; dx=-1.259543487245242E-7 evalInputDelta=3.98850030514523
Fitness changed from -58.60611422440094 to -62.59461452954617
Iteration 7 complete. Error: -62.59461452954617 Total: 20.2656; Orientation: 2.5112; Line Search: 12.0508
Adding measurement 73c12d02 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.703e+04, gradient 8.485e-04, dot -0.461; [3c9cdcc2-e4e3-4f3d-9bc3-f38c58066000 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -62.59461452954617, -39.30687527272298, -36.51446648653319, -36.5144644181132
LBFGS Accumulation History: 3 points
Removed measurement 73c12d02 to history. Total: 3
th(0)=-62.59461452954617;dx=-7.187396005330781E-7
Armijo: th(2.8072329265690096E7)=-62.19608417352299; dx=1.777742150834704E-7 evalInputDelta=-0.3985303560231799
New Minimum: -62.59461452954617 > -65.32269123013809
WOLF (strong): th(1.4036164632845048E7)=-65.32269123013809; dx=1.4865006154126968E-7 evalInputDelta=2.72807670059192
END: th(4678721.544281683)=-65.31122516935814; dx=-3.1078721276514725E-7 evalInputDelta=2.716610639811968
Fitness changed from -62.59461452954617 to -65.32269123013809
Iteration 8 complete. Error: -65.32269123013809 Total: 32.3122; Orientation: 2.4631; Line Search: 23.9552
Adding measurement 25fb8016 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.788e+04, gradient 9.871e-04, dot -0.330; [3c9cdcc2-e4e3-4f3d-9bc3-f38c58066000 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.32269123013809, -39.30687527272298, -36.51446648653319, -36.5144644181132
LBFGS Accumulation History: 3 points
Removed measurement 25fb8016 to history. Total: 3
th(0)=-65.32269123013809;dx=-9.742729062115174E-7
New Minimum: -65.32269123013809 > -70.58883370720068
WOLF (strong): th(1.0080000000000004E7)=-70.58883370720068; dx=8.855754432300571E-8 evalInputDelta=5.266142477062587
END: th(5040000.000000002)=-69.57337896192544; dx=-4.972133662458769E-7 evalInputDelta=4.250687731787352
Fitness changed from -65.32269123013809 to -70.58883370720068
Iteration 9 complete. Error: -70.58883370720068 Total: 26.6660; Orientation: 2.4969; Line Search: 18.2083
Adding measurement 67443f37 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.369e+04, gradient 7.634e-04, dot -0.496; [3c9cdcc2-e4e3-4f3d-9bc3-f38c58066000 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.58883370720068, -39.30687527272298, -36.51446648653319, -36.5144644181132
LBFGS Accumulation History: 3 points
Removed measurement 67443f37 to history. Total: 3
th(0)=-70.58883370720068;dx=-5.823684591001263E-7
New Minimum: -70.58883370720068 > -73.74540639792026
WOLF (strong): th(1.0858350837760698E7)=-73.74540639792026; dx=7.64708543561102E-9 evalInputDelta=3.1565726907195852
END: th(5429175.418880349)=-73.12096930655926; dx=-2.588629359717125E-7 evalInputDelta=2.5321355993585826
Fitness changed from -70.58883370720068 to -73.74540639792026
Iteration 10 complete. Error: -73.74540639792026 Total: 26.4431; Orientation: 2.5231; Line Search: 18.2069
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9aa49536-da42-416b-8ffc-0a5df933fdc3.jpg)
Final threshold in iteration 11: -73.74540639792026 (> -Infinity) after 302.639s (< 5400.000s)
Returns
-73.74540639792026