BasicOptimizer.scala:89 executed in 94.06 seconds (1.151 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: 284358860350900
Reset training subject: 284360826202000
Adding measurement a8992d3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-56.96730639405983;dx=-5.297118502947825E-6
New Minimum: -56.96730639405983 > -56.96731297397307
END: th(2.154434690031884)=-56.96731297397307; dx=-3.52559037005148E-6 evalInputDelta=6.579913240045698E-6
Fitness changed from -56.96730639405983 to -56.96731297397307
Iteration 1 complete. Error: -56.96731297397307 Total: 9.6984; Orientation: 0.0607; Line Search: 4.0435
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c810f6f4-d576-4d3f-8a53-81636b60cace.jpg)
Adding measurement 12a27838 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-56.96731297397307;dx=-3.525595028233874E-6
New Minimum: -56.96731297397307 > -56.967332713708245
WOLFE (weak): th(4.641588833612779)=-56.967332713708245; dx=-3.5256065617311437E-6 evalInputDelta=1.9739735172663586E-5
New Minimum: -56.967332713708245 > -56.96734916348233
WOLFE (weak): th(9.283177667225559)=-56.96734916348233; dx=-3.5255438424986144E-6 evalInputDelta=3.618950925954323E-5
New Minimum: -56.96734916348233 > -56.96741167258053
WOLFE (weak): th(27.849533001676676)=-56.96741167258053; dx=-3.525544450241434E-6 evalInputDelta=9.869860745936876E-5
New Minimum: -56.96741167258053 > -56.96770776737689
WOLFE (weak): th(111.3981320067067)=-56.96770776737689; dx=-3.525555410133402E-6 evalInputDelta=3.9479340382087E-4
New Minimum: -56.96770776737689 > -56.969280333948014
WOLFE (weak): th(556.9906600335335)=-56.969280333948014; dx=-3.525485611559113E-6 evalInputDelta=0.0019673599749410187
New Minimum: -56.969280333948014 > -56.97909308996627
WOLFE (weak): th(3341.9439602012008)=-56.97909308996627; dx=-3.524624045131703E-6 evalInputDelta=0.011780115993197171
New Minimum: -56.97909308996627 > -57.04969970786874
WOLFE (weak): th(23393.607721408407)=-57.04969970786874; dx=-3.51729664766743E-6 evalInputDelta=0.08238673389566742
New Minimum: -57.04969970786874 > -57.62071810012895
WOLFE (weak): th(187148.86177126726)=-57.62071810012895; dx=-3.458389731735407E-6 evalInputDelta=0.6534051261558744
New Minimum: -57.62071810012895 > -62.32367772043613
END: th(1684339.7559414054)=-62.32367772043613; dx=-2.806466821851471E-6 evalInputDelta=5.356364746463058
Fitness changed from -56.96731297397307 to -62.32367772043613
Iteration 2 complete. Error: -62.32367772043613 Total: 21.1708; Orientation: 0.0596; Line Search: 18.9329
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6a6c4de8-0370-4033-a951-122e5f90079e.jpg)
Adding measurement f3ab904 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-62.32367772043613;dx=-2.5105443068843883E-6
New Minimum: -62.32367772043613 > -69.65809085162829
END: th(3628800.0000000005)=-69.65809085162829; dx=-1.5269783439362834E-6 evalInputDelta=7.334413131192157
Fitness changed from -62.32367772043613 to -69.65809085162829
Iteration 3 complete. Error: -69.65809085162829 Total: 6.1265; Orientation: 0.0623; Line Search: 3.7428
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/7491e854-f600-4293-a92d-5c88acd46ab5.jpg)
Adding measurement 61be86a3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.421e+03, gradient 1.205e-03, dot -0.762; [a728e156-c224-4852-b010-625b6707e590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.65809085162829, -62.32367772043613, -56.96731297397307, -56.96730639405983
LBFGS Accumulation History: 3 points
Removed measurement 61be86a3 to history. Total: 3
th(0)=-69.65809085162829;dx=-1.4528499316161458E-6
New Minimum: -69.65809085162829 > -77.775823613169
END: th(7818012.603187701)=-77.775823613169; dx=-6.698105760025561E-7 evalInputDelta=8.117732761540708
Fitness changed from -69.65809085162829 to -77.775823613169
Iteration 4 complete. Error: -77.775823613169 Total: 6.8779; Orientation: 1.0189; Line Search: 3.7506
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/2946b73f-a31c-445c-a10a-86ee79e70dfc.jpg)
Adding measurement 42dd7a2f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.580e+03, gradient 1.017e-03, dot -0.539; [a728e156-c224-4852-b010-625b6707e590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.775823613169, -62.32367772043613, -56.96731297397307, -56.96730639405983
LBFGS Accumulation History: 3 points
Removed measurement 42dd7a2f to history. Total: 3
th(0)=-77.775823613169;dx=-1.0341992475017797E-6
New Minimum: -77.775823613169 > -84.5738657122568
END: th(1.6843397559414055E7)=-84.5738657122568; dx=-5.831704292996164E-8 evalInputDelta=6.798042099087809
Fitness changed from -77.775823613169 to -84.5738657122568
Iteration 5 complete. Error: -84.5738657122568 Total: 6.8520; Orientation: 1.0148; Line Search: 3.7646
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b827066d-c61b-4793-ab53-439f4e30603e.jpg)
Adding measurement 69da09e7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.371e+03, gradient 1.246e-03, dot -0.218; [a728e156-c224-4852-b010-625b6707e590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.5738657122568, -62.32367772043613, -56.96731297397307, -56.96730639405983
LBFGS Accumulation History: 3 points
Removed measurement 69da09e7 to history. Total: 3
th(0)=-84.5738657122568;dx=-1.5525275583311975E-6
Armijo: th(3.628800000000001E7)=-77.89092911409423; dx=3.992345655605172E-7 evalInputDelta=-6.68293659816257
New Minimum: -84.5738657122568 > -86.89411023436945
WOLF (strong): th(1.8144000000000004E7)=-86.89411023436945; dx=5.660166717965023E-7 evalInputDelta=2.3202445221126453
New Minimum: -86.89411023436945 > -90.48292986410893
END: th(6048000.000000001)=-90.48292986410893; dx=-3.601399389134589E-7 evalInputDelta=5.909064151852121
Fitness changed from -84.5738657122568 to -90.48292986410893
Iteration 6 complete. Error: -90.48292986410893 Total: 10.8877; Orientation: 0.9688; Line Search: 7.5784
Adding measurement 1ac343cd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.484e+04, gradient 8.340e-04, dot -0.503; [a728e156-c224-4852-b010-625b6707e590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -90.48292986410893, -62.32367772043613, -56.96731297397307, -56.96730639405983
LBFGS Accumulation History: 3 points
Removed measurement 1ac343cd to history. Total: 3
th(0)=-90.48292986410893;dx=-6.956057951484369E-7
New Minimum: -90.48292986410893 > -94.77058064259516
END: th(1.3030021005312836E7)=-94.77058064259516; dx=-5.793514345769413E-8 evalInputDelta=4.287650778486238
Fitness changed from -90.48292986410893 to -94.77058064259516
Iteration 7 complete. Error: -94.77058064259516 Total: 6.5645; Orientation: 0.9788; Line Search: 3.7274
Adding measurement 631794a6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.626e+04, gradient 1.002e-03, dot -0.353; [a728e156-c224-4852-b010-625b6707e590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -94.77058064259516, -62.32367772043613, -56.96731297397307, -56.96730639405983
LBFGS Accumulation History: 3 points
Removed measurement 631794a6 to history. Total: 3
th(0)=-94.77058064259516;dx=-1.003814993958725E-6
Armijo: th(2.8072329265690096E7)=-92.02597108793402; dx=3.3991250163841683E-7 evalInputDelta=-2.744609554661139
New Minimum: -94.77058064259516 > -97.16624480073492
WOLF (strong): th(1.4036164632845048E7)=-97.16624480073492; dx=3.4056245209706074E-7 evalInputDelta=2.395664158139752
New Minimum: -97.16624480073492 > -98.03992074988356
END: th(4678721.544281683)=-98.03992074988356; dx=-3.640051979436403E-7 evalInputDelta=3.2693401072884
Fitness changed from -94.77058064259516 to -98.03992074988356
Iteration 8 complete. Error: -98.03992074988356 Total: 10.3104; Orientation: 0.9329; Line Search: 7.5141
Adding measurement 7501ff31 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.158e+04, gradient 6.621e-04, dot -0.617; [a728e156-c224-4852-b010-625b6707e590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.03992074988356, -62.32367772043613, -56.96731297397307, -56.96730639405983
LBFGS Accumulation History: 3 points
Removed measurement 7501ff31 to history. Total: 3
th(0)=-98.03992074988356;dx=-4.3841387425840306E-7
New Minimum: -98.03992074988356 > -101.25783666585721
END: th(1.0080000000000004E7)=-101.25783666585721; dx=-2.1981674967596255E-7 evalInputDelta=3.2179159159736486
Fitness changed from -98.03992074988356 to -101.25783666585721
Iteration 9 complete. Error: -101.25783666585721 Total: 6.7403; Orientation: 0.9483; Line Search: 3.6974
Adding measurement 36383574 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.398e+04, gradient 7.110e-04, dot -0.541; [a728e156-c224-4852-b010-625b6707e590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -101.25783666585721, -62.32367772043613, -56.96731297397307, -56.96730639405983
LBFGS Accumulation History: 3 points
Removed measurement 36383574 to history. Total: 3
th(0)=-101.25783666585721;dx=-5.055015108711406E-7
New Minimum: -101.25783666585721 > -103.7351129643402
WOLF (strong): th(2.1716701675521396E7)=-103.7351129643402; dx=6.614892505410673E-8 evalInputDelta=2.477276298482991
New Minimum: -103.7351129643402 > -103.89733047947233
END: th(1.0858350837760698E7)=-103.89733047947233; dx=-6.29579082166217E-8 evalInputDelta=2.6394938136151183
Fitness changed from -101.25783666585721 to -103.89733047947233
Iteration 10 complete. Error: -103.89733047947233 Total: 8.5126; Orientation: 1.0257; Line Search: 5.6832
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/db3fa7eb-3e21-462c-a5cf-01b098b63538.jpg)
Final threshold in iteration 11: -103.89733047947233 (> -Infinity) after 94.061s (< 5400.000s)
Returns
-103.89733047947233