BasicOptimizer.scala:89 executed in 131.38 seconds (1.870 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: 35030656124700
Reset training subject: 35033235952700
Adding measurement 6620eb8b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-74.28304443687732;dx=-4.921341241716237E-6
New Minimum: -74.28304443687732 > -74.28304904343307
END: th(2.154434690031884)=-74.28304904343307; dx=-3.3460299714484745E-6 evalInputDelta=4.606555748409846E-6
Fitness changed from -74.28304443687732 to -74.28304904343307
Iteration 1 complete. Error: -74.28304904343307 Total: 12.8759; Orientation: 0.0638; Line Search: 5.2156
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c050d1b4-8ff5-4568-8bfb-7dec32317b89.jpg)
Adding measurement 350e6631 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-74.28304904343307;dx=-3.321872699881723E-6
New Minimum: -74.28304904343307 > -74.28306746965313
WOLFE (weak): th(4.641588833612779)=-74.28306746965313; dx=-3.3220697129767037E-6 evalInputDelta=1.8426220066203314E-5
New Minimum: -74.28306746965313 > -74.28308589586865
WOLFE (weak): th(9.283177667225559)=-74.28308589586865; dx=-3.320657366758268E-6 evalInputDelta=3.685243558493312E-5
New Minimum: -74.28308589586865 > -74.28315269086156
WOLFE (weak): th(27.849533001676676)=-74.28315269086156; dx=-3.3189378287564573E-6 evalInputDelta=1.036474284887845E-4
New Minimum: -74.28315269086156 > -74.28346593554424
WOLFE (weak): th(111.3981320067067)=-74.28346593554424; dx=-3.317314007905922E-6 evalInputDelta=4.168921111755708E-4
New Minimum: -74.28346593554424 > -74.28514960308321
WOLFE (weak): th(556.9906600335335)=-74.28514960308321; dx=-3.3166538020240484E-6 evalInputDelta=0.0021005596501453283
New Minimum: -74.28514960308321 > -74.29564690472333
WOLFE (weak): th(3341.9439602012008)=-74.29564690472333; dx=-3.3157704442907894E-6 evalInputDelta=0.01259786129025997
New Minimum: -74.29564690472333 > -74.37113864697046
WOLFE (weak): th(23393.607721408407)=-74.37113864697046; dx=-3.3106308962346234E-6 evalInputDelta=0.08808960353739792
New Minimum: -74.37113864697046 > -74.98271210253375
WOLFE (weak): th(187148.86177126726)=-74.98271210253375; dx=-3.2617163516279345E-6 evalInputDelta=0.6996630591006863
New Minimum: -74.98271210253375 > -80.02229769559895
END: th(1684339.7559414054)=-80.02229769559895; dx=-2.6301502806874857E-6 evalInputDelta=5.739248652165884
Fitness changed from -74.28304904343307 to -80.02229769559895
Iteration 2 complete. Error: -80.02229769559895 Total: 29.1911; Orientation: 0.0627; Line Search: 26.0516
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/443fb9e4-b6ee-4a8e-8775-77e347cc4428.jpg)
Adding measurement 2dedc34b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-80.02229769559895;dx=-2.5115738674751617E-6
New Minimum: -80.02229769559895 > -87.95268993515765
END: th(3628800.0000000005)=-87.95268993515765; dx=-1.4089749745018425E-6 evalInputDelta=7.930392239558699
Fitness changed from -80.02229769559895 to -87.95268993515765
Iteration 3 complete. Error: -87.95268993515765 Total: 8.1841; Orientation: 0.0624; Line Search: 5.0107
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/5dff6d80-847b-4545-958f-a97347efd169.jpg)
Adding measurement a403c6e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.479e+03, gradient 1.233e-03, dot -0.683; [c1b63228-d429-452a-8f4d-09955fdde055 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.95268993515765, -80.02229769559895, -74.28304904343307, -74.28304443687732
LBFGS Accumulation History: 3 points
Removed measurement a403c6e to history. Total: 3
th(0)=-87.95268993515765;dx=-1.52124134606518E-6
New Minimum: -87.95268993515765 > -97.22781224287148
END: th(7818012.603187701)=-97.22781224287148; dx=-6.382703260469396E-7 evalInputDelta=9.27512230771383
Fitness changed from -87.95268993515765 to -97.22781224287148
Iteration 4 complete. Error: -97.22781224287148 Total: 9.4050; Orientation: 1.0598; Line Search: 5.1517
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/fb3dbfb9-aa01-4679-95a5-7f0cf0281f03.jpg)
Adding measurement db46e6f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.242e+04, gradient 1.192e-03, dot -0.490; [c1b63228-d429-452a-8f4d-09955fdde055 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -97.22781224287148, -80.02229769559895, -74.28304904343307, -74.28304443687732
LBFGS Accumulation History: 3 points
Removed measurement db46e6f to history. Total: 3
th(0)=-97.22781224287148;dx=-1.4200861715332209E-6
New Minimum: -97.22781224287148 > -100.19465531783484
WOLF (strong): th(1.6843397559414055E7)=-100.19465531783484; dx=3.411223774891558E-7 evalInputDelta=2.9668430749633643
New Minimum: -100.19465531783484 > -102.39223190976016
WOLF (strong): th(8421698.779707028)=-102.39223190976016; dx=1.2887960117363327E-8 evalInputDelta=5.164419666888676
END: th(2807232.926569009)=-100.62557916514321; dx=-7.465896777649373E-7 evalInputDelta=3.397766922271728
Fitness changed from -97.22781224287148 to -102.39223190976016
Iteration 5 complete. Error: -102.39223190976016 Total: 14.2710; Orientation: 1.0441; Line Search: 10.0852
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/67ae38b6-63c5-4040-a6c5-b95c9fd60e72.jpg)
Adding measurement 1410db5c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.054e+04, gradient 1.434e-03, dot -0.304; [c1b63228-d429-452a-8f4d-09955fdde055 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -102.39223190976016, -80.02229769559895, -74.28304904343307, -74.28304443687732
LBFGS Accumulation History: 3 points
Removed measurement 1410db5c to history. Total: 3
th(0)=-102.39223190976016;dx=-2.0553211387167972E-6
New Minimum: -102.39223190976016 > -107.82919115144891
WOLF (strong): th(6048000.000000001)=-107.82919115144891; dx=3.845616064704993E-7 evalInputDelta=5.436959241688754
END: th(3024000.0000000005)=-107.39558967517952; dx=-7.988653913048038E-7 evalInputDelta=5.003357765419366
Fitness changed from -102.39223190976016 to -107.82919115144891
Iteration 6 complete. Error: -107.82919115144891 Total: 11.8741; Orientation: 1.0149; Line Search: 7.7183
Adding measurement 2f42e5bf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.795e+04, gradient 1.291e-03, dot -0.367; [c1b63228-d429-452a-8f4d-09955fdde055 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -107.82919115144891, -80.02229769559895, -74.28304904343307, -74.28304443687732
LBFGS Accumulation History: 3 points
Removed measurement 2f42e5bf to history. Total: 3
th(0)=-107.82919115144891;dx=-1.665403620669805E-6
New Minimum: -107.82919115144891 > -111.60184482552326
WOLF (strong): th(6515010.502656418)=-111.60184482552326; dx=4.757381463478568E-7 evalInputDelta=3.7726536740743484
New Minimum: -111.60184482552326 > -111.87020355284467
END: th(3257505.251328209)=-111.87020355284467; dx=-4.841277656895538E-7 evalInputDelta=4.041012401395761
Fitness changed from -107.82919115144891 to -111.87020355284467
Iteration 7 complete. Error: -111.87020355284467 Total: 11.3565; Orientation: 0.9994; Line Search: 7.7398
Adding measurement 54cdfcbb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.459e+04, gradient 8.294e-04, dot -0.672; [c1b63228-d429-452a-8f4d-09955fdde055 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -111.87020355284467, -80.02229769559895, -74.28304904343307, -74.28304443687732
LBFGS Accumulation History: 3 points
Removed measurement 54cdfcbb to history. Total: 3
th(0)=-111.87020355284467;dx=-6.874546377806031E-7
New Minimum: -111.87020355284467 > -115.94038106934758
END: th(7018082.316422524)=-115.94038106934758; dx=-3.823063967693531E-7 evalInputDelta=4.070177516502909
Fitness changed from -111.87020355284467 to -115.94038106934758
Iteration 8 complete. Error: -115.94038106934758 Total: 8.8229; Orientation: 1.0633; Line Search: 5.2494
Adding measurement 25b8b161 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.705e+04, gradient 9.090e-04, dot -0.563; [c1b63228-d429-452a-8f4d-09955fdde055 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -115.94038106934758, -80.02229769559895, -74.28304904343307, -74.28304443687732
LBFGS Accumulation History: 3 points
Removed measurement 25b8b161 to history. Total: 3
th(0)=-115.94038106934758;dx=-8.240567434403946E-7
New Minimum: -115.94038106934758 > -117.91513012015747
WOLF (strong): th(1.5120000000000006E7)=-117.91513012015747; dx=1.9585908402860845E-7 evalInputDelta=1.9747490508098906
New Minimum: -117.91513012015747 > -118.92997227389527
END: th(7560000.000000003)=-118.92997227389527; dx=-3.810098402837496E-8 evalInputDelta=2.9895912045476933
Fitness changed from -115.94038106934758 to -118.92997227389527
Iteration 9 complete. Error: -118.92997227389527 Total: 11.3423; Orientation: 1.0210; Line Search: 7.8579
Adding measurement 3b5ae734 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.658e+04, gradient 1.125e-03, dot -0.401; [c1b63228-d429-452a-8f4d-09955fdde055 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -118.92997227389527, -80.02229769559895, -74.28304904343307, -74.28304443687732
LBFGS Accumulation History: 3 points
Removed measurement 3b5ae734 to history. Total: 3
th(0)=-118.92997227389527;dx=-1.2634986105885027E-6
Armijo: th(1.6287526256641047E7)=-114.05134655918768; dx=7.636918493875957E-7 evalInputDelta=-4.878625714707596
New Minimum: -118.92997227389527 > -120.91752258843484
WOLF (strong): th(8143763.128320524)=-120.91752258843484; dx=5.489312283132481E-7 evalInputDelta=1.9875503145395612
New Minimum: -120.91752258843484 > -121.75054867250125
END: th(2714587.7094401745)=-121.75054867250125; dx=-5.49275458450705E-7 evalInputDelta=2.8205763986059793
Fitness changed from -118.92997227389527 to -121.75054867250125
Iteration 10 complete. Error: -121.75054867250125 Total: 13.6059; Orientation: 1.0343; Line Search: 10.1215
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1ef52fd6-daa7-4805-be8b-249293096078.jpg)
Final threshold in iteration 11: -121.75054867250125 (> -Infinity) after 131.385s (< 5400.000s)
Returns
-121.75054867250125