BasicOptimizer.scala:89 executed in 92.08 seconds (1.071 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: 281635763198300
Reset training subject: 281637663576700
Adding measurement 53702c09 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-58.60120412336963;dx=-5.143489129425922E-6
New Minimum: -58.60120412336963 > -58.601210519824114
END: th(2.154434690031884)=-58.601210519824114; dx=-3.4268144605945035E-6 evalInputDelta=6.396454487855863E-6
Fitness changed from -58.60120412336963 to -58.601210519824114
Iteration 1 complete. Error: -58.601210519824114 Total: 9.1123; Orientation: 0.0598; Line Search: 3.5144
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/1f72b85f-74d3-412a-be88-a0ae6aabe40b.jpg)
Adding measurement 27db6d16 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-58.601210519824114;dx=-3.4268142440102715E-6
New Minimum: -58.601210519824114 > -58.601226510957275
WOLFE (weak): th(4.641588833612779)=-58.601226510957275; dx=-3.4268187571507347E-6 evalInputDelta=1.599113316075318E-5
New Minimum: -58.601226510957275 > -58.601242502086066
WOLFE (weak): th(9.283177667225559)=-58.601242502086066; dx=-3.4268170406653464E-6 evalInputDelta=3.1982261951668534E-5
New Minimum: -58.601242502086066 > -58.60130646655762
WOLFE (weak): th(27.849533001676676)=-58.60130646655762; dx=-3.4268213125225933E-6 evalInputDelta=9.594673350221683E-5
New Minimum: -58.60130646655762 > -58.60159110760937
WOLFE (weak): th(111.3981320067067)=-58.60159110760937; dx=-3.4267973540895245E-6 evalInputDelta=3.8058778525851267E-4
New Minimum: -58.60159110760937 > -58.60311983027989
WOLFE (weak): th(556.9906600335335)=-58.60311983027989; dx=-3.4268055027929624E-6 evalInputDelta=0.0019093104557725837
New Minimum: -58.60311983027989 > -58.61266225201842
WOLFE (weak): th(3341.9439602012008)=-58.61266225201842; dx=-3.426161725331775E-6 evalInputDelta=0.011451732194302622
New Minimum: -58.61266225201842 > -58.68128738765335
WOLFE (weak): th(23393.607721408407)=-58.68128738765335; dx=-3.418965163432963E-6 evalInputDelta=0.08007686782923429
New Minimum: -58.68128738765335 > -59.23607374477163
WOLFE (weak): th(187148.86177126726)=-59.23607374477163; dx=-3.3570556269817054E-6 evalInputDelta=0.6348632249475159
New Minimum: -59.23607374477163 > -63.800545834804836
END: th(1684339.7559414054)=-63.800545834804836; dx=-2.7246774348589355E-6 evalInputDelta=5.199335314980722
Fitness changed from -58.601210519824114 to -63.800545834804836
Iteration 2 complete. Error: -63.800545834804836 Total: 21.2071; Orientation: 0.0632; Line Search: 19.0524
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ef6922a8-519d-46f1-8472-bcd6ccab9096.jpg)
Adding measurement 78f74dca to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-63.800545834804836;dx=-2.4388521106815297E-6
New Minimum: -63.800545834804836 > -71.0193273610127
END: th(3628800.0000000005)=-71.0193273610127; dx=-1.5292611530948462E-6 evalInputDelta=7.218781526207863
Fitness changed from -63.800545834804836 to -71.0193273610127
Iteration 3 complete. Error: -71.0193273610127 Total: 5.8159; Orientation: 0.0604; Line Search: 3.6892
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/dd877e9c-b439-41ba-9209-81485956ab4d.jpg)
Adding measurement b906bfd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.753e+03, gradient 1.208e-03, dot -0.777; [e0af6d37-c59b-48f1-ba21-3be1d79fb6d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -71.0193273610127, -63.800545834804836, -58.601210519824114, -58.60120412336963
LBFGS Accumulation History: 3 points
Removed measurement b906bfd to history. Total: 3
th(0)=-71.0193273610127;dx=-1.4599619427685268E-6
New Minimum: -71.0193273610127 > -79.32282598280014
END: th(7818012.603187701)=-79.32282598280014; dx=-7.021110312984776E-7 evalInputDelta=8.30349862178744
Fitness changed from -71.0193273610127 to -79.32282598280014
Iteration 4 complete. Error: -79.32282598280014 Total: 6.7132; Orientation: 1.0634; Line Search: 3.5836
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/774980e4-5291-4f7d-9308-677203e1facf.jpg)
Adding measurement 5d5c0c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.025e+03, gradient 1.025e-03, dot -0.557; [e0af6d37-c59b-48f1-ba21-3be1d79fb6d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.32282598280014, -63.800545834804836, -58.601210519824114, -58.60120412336963
LBFGS Accumulation History: 3 points
Removed measurement 5d5c0c to history. Total: 3
th(0)=-79.32282598280014;dx=-1.0497595660700608E-6
New Minimum: -79.32282598280014 > -86.54648540680137
END: th(1.6843397559414055E7)=-86.54648540680137; dx=-7.698769045139041E-8 evalInputDelta=7.223659424001227
Fitness changed from -79.32282598280014 to -86.54648540680137
Iteration 5 complete. Error: -86.54648540680137 Total: 6.9384; Orientation: 1.0228; Line Search: 3.6248
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/5a1c74ba-0583-40eb-9b7f-a4fd2a6a56fd.jpg)
Adding measurement 4e288cb6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.841e+03, gradient 1.254e-03, dot -0.223; [e0af6d37-c59b-48f1-ba21-3be1d79fb6d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -86.54648540680137, -63.800545834804836, -58.601210519824114, -58.60120412336963
LBFGS Accumulation History: 3 points
Removed measurement 4e288cb6 to history. Total: 3
th(0)=-86.54648540680137;dx=-1.5730492421510272E-6
Armijo: th(3.628800000000001E7)=-80.49211877099724; dx=3.891518950170459E-7 evalInputDelta=-6.054366635804129
New Minimum: -86.54648540680137 > -89.14949168574101
WOLF (strong): th(1.8144000000000004E7)=-89.14949168574101; dx=5.391421392608903E-7 evalInputDelta=2.6030062789396453
New Minimum: -89.14949168574101 > -92.56336748674205
END: th(6048000.000000001)=-92.56336748674205; dx=-3.635736126605806E-7 evalInputDelta=6.016882079940686
Fitness changed from -86.54648540680137 to -92.56336748674205
Iteration 6 complete. Error: -92.56336748674205 Total: 10.6026; Orientation: 0.9829; Line Search: 7.5248
Adding measurement 21828022 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.535e+04, gradient 8.454e-04, dot -0.498; [e0af6d37-c59b-48f1-ba21-3be1d79fb6d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -92.56336748674205, -63.800545834804836, -58.601210519824114, -58.60120412336963
LBFGS Accumulation History: 3 points
Removed measurement 21828022 to history. Total: 3
th(0)=-92.56336748674205;dx=-7.147054894837081E-7
New Minimum: -92.56336748674205 > -96.79797584354405
END: th(1.3030021005312836E7)=-96.79797584354405; dx=-5.4444221977926856E-8 evalInputDelta=4.234608356801999
Fitness changed from -92.56336748674205 to -96.79797584354405
Iteration 7 complete. Error: -96.79797584354405 Total: 6.4661; Orientation: 1.0105; Line Search: 3.7337
Adding measurement 2fd06ac5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.671e+04, gradient 1.019e-03, dot -0.346; [e0af6d37-c59b-48f1-ba21-3be1d79fb6d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -96.79797584354405, -63.800545834804836, -58.601210519824114, -58.60120412336963
LBFGS Accumulation History: 3 points
Removed measurement 2fd06ac5 to history. Total: 3
th(0)=-96.79797584354405;dx=-1.038451001692485E-6
Armijo: th(2.8072329265690096E7)=-94.25195919166659; dx=3.2962331040505253E-7 evalInputDelta=-2.5460166518774656
New Minimum: -96.79797584354405 > -99.3281921121046
WOLF (strong): th(1.4036164632845048E7)=-99.3281921121046; dx=3.439954246609319E-7 evalInputDelta=2.530216268560551
New Minimum: -99.3281921121046 > -100.23090756909934
END: th(4678721.544281683)=-100.23090756909934; dx=-3.8763508473051775E-7 evalInputDelta=3.4329317255552922
Fitness changed from -96.79797584354405 to -100.23090756909934
Iteration 8 complete. Error: -100.23090756909934 Total: 10.2507; Orientation: 1.0039; Line Search: 7.4764
Adding measurement 690df633 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.224e+04, gradient 6.755e-04, dot -0.602; [e0af6d37-c59b-48f1-ba21-3be1d79fb6d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -100.23090756909934, -63.800545834804836, -58.601210519824114, -58.60120412336963
LBFGS Accumulation History: 3 points
Removed measurement 690df633 to history. Total: 3
th(0)=-100.23090756909934;dx=-4.563670009130111E-7
New Minimum: -100.23090756909934 > -103.48632964451173
END: th(1.0080000000000004E7)=-103.48632964451173; dx=-2.1230931271400162E-7 evalInputDelta=3.2554220754123833
Fitness changed from -100.23090756909934 to -103.48632964451173
Iteration 9 complete. Error: -103.48632964451173 Total: 6.3828; Orientation: 1.0110; Line Search: 3.6443
Adding measurement 73064ca6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.369e+04, gradient 7.255e-04, dot -0.517; [e0af6d37-c59b-48f1-ba21-3be1d79fb6d6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -103.48632964451173, -63.800545834804836, -58.601210519824114, -58.60120412336963
LBFGS Accumulation History: 3 points
Removed measurement 73064ca6 to history. Total: 3
th(0)=-103.48632964451173;dx=-5.262934912212173E-7
New Minimum: -103.48632964451173 > -105.7385028341134
WOLF (strong): th(2.1716701675521396E7)=-105.7385028341134; dx=7.422235001896963E-8 evalInputDelta=2.2521731896016774
New Minimum: -105.7385028341134 > -106.07550732225893
END: th(1.0858350837760698E7)=-106.07550732225893; dx=-4.0675426927836776E-8 evalInputDelta=2.5891776777472018
Fitness changed from -103.48632964451173 to -106.07550732225893
Iteration 10 complete. Error: -106.07550732225893 Total: 8.2807; Orientation: 0.9945; Line Search: 5.4819
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/6f9762ca-169a-4ac0-9c22-c71012adc70a.jpg)
Final threshold in iteration 11: -106.07550732225893 (> -Infinity) after 92.079s (< 5400.000s)
Returns
-106.07550732225893