BasicOptimizer.scala:89 executed in 130.39 seconds (1.929 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: 27777083657200
Reset training subject: 27779770947900
Adding measurement 74fef77e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-82.55128738951556;dx=-5.092859051692585E-6
New Minimum: -82.55128738951556 > -82.55129567985213
END: th(2.154434690031884)=-82.55129567985213; dx=-3.463411705206817E-6 evalInputDelta=8.290336566574297E-6
Fitness changed from -82.55128738951556 to -82.55129567985213
Iteration 1 complete. Error: -82.55129567985213 Total: 13.0256; Orientation: 0.0618; Line Search: 5.3094
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8ef23000-1990-416d-bcb4-fbd7b9983e5e.jpg)
Adding measurement ea9ba58 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-82.55129567985213;dx=-3.4338724573141626E-6
New Minimum: -82.55129567985213 > -82.55131640568987
WOLFE (weak): th(4.641588833612779)=-82.55131640568987; dx=-3.4317242443826712E-6 evalInputDelta=2.0725837742929798E-5
New Minimum: -82.55131640568987 > -82.55133713152242
WOLFE (weak): th(9.283177667225559)=-82.55133713152242; dx=-3.4311197823561634E-6 evalInputDelta=4.145167028468677E-5
New Minimum: -82.55133713152242 > -82.55141174447647
WOLFE (weak): th(27.849533001676676)=-82.55141174447647; dx=-3.428395877866872E-6 evalInputDelta=1.1606462433633169E-4
New Minimum: -82.55141174447647 > -82.55173506649813
WOLFE (weak): th(111.3981320067067)=-82.55173506649813; dx=-3.4266203057859087E-6 evalInputDelta=4.393866459935225E-4
New Minimum: -82.55173506649813 > -82.55348429958008
WOLFE (weak): th(556.9906600335335)=-82.55348429958008; dx=-3.425378086161944E-6 evalInputDelta=0.0021886197279457065
New Minimum: -82.55348429958008 > -82.5644099499431
WOLFE (weak): th(3341.9439602012008)=-82.5644099499431; dx=-3.4252616202913304E-6 evalInputDelta=0.013114270090966329
New Minimum: -82.5644099499431 > -82.6429897600018
WOLFE (weak): th(23393.607721408407)=-82.6429897600018; dx=-3.42082575239742E-6 evalInputDelta=0.09169408014966507
New Minimum: -82.6429897600018 > -83.279515201781
WOLFE (weak): th(187148.86177126726)=-83.279515201781; dx=-3.368720527025655E-6 evalInputDelta=0.7282195219288639
New Minimum: -83.279515201781 > -88.60125490195963
END: th(1684339.7559414054)=-88.60125490195963; dx=-2.805772535015751E-6 evalInputDelta=6.049959222107503
Fitness changed from -82.55129567985213 to -88.60125490195963
Iteration 2 complete. Error: -88.60125490195963 Total: 29.3487; Orientation: 0.0644; Line Search: 26.4008
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/dab6baa0-91a6-4d01-83cb-a6fb21820925.jpg)
Adding measurement 8caed15 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-88.60125490195963;dx=-2.7748960901080203E-6
New Minimum: -88.60125490195963 > -97.60472281720875
END: th(3628800.0000000005)=-97.60472281720875; dx=-1.6752585058946244E-6 evalInputDelta=9.003467915249118
Fitness changed from -88.60125490195963 to -97.60472281720875
Iteration 3 complete. Error: -97.60472281720875 Total: 8.4686; Orientation: 0.0601; Line Search: 5.2945
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/21713b06-2148-4463-8bc4-ec0e4aa7628d.jpg)
Adding measurement 3b52f015 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.370e+04, gradient 1.311e-03, dot -0.740; [e042b858-3e08-46d5-ac27-a33eb2b5aec2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -97.60472281720875, -88.60125490195963, -82.55129567985213, -82.55128738951556
LBFGS Accumulation History: 3 points
Removed measurement 3b52f015 to history. Total: 3
th(0)=-97.60472281720875;dx=-1.7178531533340184E-6
New Minimum: -97.60472281720875 > -108.55606654056427
END: th(7818012.603187701)=-108.55606654056427; dx=-7.944571564793674E-7 evalInputDelta=10.95134372335552
Fitness changed from -97.60472281720875 to -108.55606654056427
Iteration 4 complete. Error: -108.55606654056427 Total: 9.2857; Orientation: 1.0303; Line Search: 5.1867
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/cd32dc99-e384-4341-a2bb-c0961a22aaec.jpg)
Adding measurement 324428dc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.430e+04, gradient 1.205e-03, dot -0.512; [e042b858-3e08-46d5-ac27-a33eb2b5aec2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -108.55606654056427, -88.60125490195963, -82.55129567985213, -82.55128738951556
LBFGS Accumulation History: 3 points
Removed measurement 324428dc to history. Total: 3
th(0)=-108.55606654056427;dx=-1.450487537867371E-6
New Minimum: -108.55606654056427 > -114.77849903789718
WOLF (strong): th(1.6843397559414055E7)=-114.77849903789718; dx=1.892488343050879E-7 evalInputDelta=6.222432497332903
New Minimum: -114.77849903789718 > -115.19508907690435
END: th(8421698.779707028)=-115.19508907690435; dx=-2.0174093777146238E-7 evalInputDelta=6.639022536340079
Fitness changed from -108.55606654056427 to -115.19508907690435
Iteration 5 complete. Error: -115.19508907690435 Total: 11.7166; Orientation: 1.0890; Line Search: 7.6943
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/dcaacc4e-5fc5-4807-b729-223c727d32d6.jpg)
Adding measurement 394678ca to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.555e+04, gradient 1.369e-03, dot -0.388; [e042b858-3e08-46d5-ac27-a33eb2b5aec2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -115.19508907690435, -88.60125490195963, -82.55129567985213, -82.55128738951556
LBFGS Accumulation History: 3 points
Removed measurement 394678ca to history. Total: 3
th(0)=-115.19508907690435;dx=-1.871957347216187E-6
Armijo: th(1.8144000000000004E7)=-111.71481240158839; dx=7.640972244099054E-7 evalInputDelta=-3.480276675315963
New Minimum: -115.19508907690435 > -119.576586954013
WOLF (strong): th(9072000.000000002)=-119.576586954013; dx=5.589395999607523E-7 evalInputDelta=4.381497877108643
New Minimum: -119.576586954013 > -119.95067481688437
END: th(3024000.0000000005)=-119.95067481688437; dx=-8.504194161285284E-7 evalInputDelta=4.75558573998002
Fitness changed from -115.19508907690435 to -119.95067481688437
Iteration 6 complete. Error: -119.95067481688437 Total: 14.7429; Orientation: 1.0007; Line Search: 10.5986
Adding measurement 4fc8e72e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.344e+04, gradient 9.311e-04, dot -0.668; [e042b858-3e08-46d5-ac27-a33eb2b5aec2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -119.95067481688437, -88.60125490195963, -82.55129567985213, -82.55128738951556
LBFGS Accumulation History: 3 points
Removed measurement 4fc8e72e to history. Total: 3
th(0)=-119.95067481688437;dx=-8.666065994839967E-7
New Minimum: -119.95067481688437 > -124.80545107322133
END: th(6515010.502656418)=-124.80545107322133; dx=-4.933180591069932E-7 evalInputDelta=4.854776256336962
Fitness changed from -119.95067481688437 to -124.80545107322133
Iteration 7 complete. Error: -124.80545107322133 Total: 8.9223; Orientation: 0.9806; Line Search: 5.2946
Adding measurement 320b3e94 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.675e+04, gradient 9.421e-04, dot -0.607; [e042b858-3e08-46d5-ac27-a33eb2b5aec2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -124.80545107322133, -88.60125490195963, -82.55129567985213, -82.55128738951556
LBFGS Accumulation History: 3 points
Removed measurement 320b3e94 to history. Total: 3
th(0)=-124.80545107322133;dx=-8.853204371061084E-7
New Minimum: -124.80545107322133 > -129.60741644874574
END: th(1.4036164632845048E7)=-129.60741644874574; dx=-1.82842170690796E-8 evalInputDelta=4.801965375524404
Fitness changed from -124.80545107322133 to -129.60741644874574
Iteration 8 complete. Error: -129.60741644874574 Total: 8.6852; Orientation: 1.1093; Line Search: 5.0901
Adding measurement 7881e13e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.965e+04, gradient 1.353e-03, dot -0.276; [e042b858-3e08-46d5-ac27-a33eb2b5aec2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -129.60741644874574, -88.60125490195963, -82.55129567985213, -82.55128738951556
LBFGS Accumulation History: 3 points
Removed measurement 7881e13e to history. Total: 3
th(0)=-129.60741644874574;dx=-1.8282801671268522E-6
Armijo: th(3.024000000000001E7)=-108.78257333013147; dx=8.21165175988602E-7 evalInputDelta=-20.824843118614268
Armijo: th(1.5120000000000006E7)=-126.78511313336723; dx=1.1164063492598774E-6 evalInputDelta=-2.8223033153785053
New Minimum: -129.60741644874574 > -135.75676627690166
END: th(5040000.000000002)=-135.75676627690166; dx=-2.2617015736345404E-7 evalInputDelta=6.14934982815592
Fitness changed from -129.60741644874574 to -135.75676627690166
Iteration 9 complete. Error: -135.75676627690166 Total: 14.0062; Orientation: 0.9729; Line Search: 10.3973
Adding measurement 60eff0bd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.006e+04, gradient 9.010e-04, dot -0.506; [e042b858-3e08-46d5-ac27-a33eb2b5aec2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -135.75676627690166, -88.60125490195963, -82.55129567985213, -82.55128738951556
LBFGS Accumulation History: 3 points
Removed measurement 60eff0bd to history. Total: 3
th(0)=-135.75676627690166;dx=-8.113791035347064E-7
New Minimum: -135.75676627690166 > -138.6169570240543
WOLF (strong): th(1.0858350837760698E7)=-138.6169570240543; dx=1.6536433942667327E-7 evalInputDelta=2.860190747152643
New Minimum: -138.6169570240543 > -138.7674595573093
END: th(5429175.418880349)=-138.7674595573093; dx=-2.0653402912471627E-7 evalInputDelta=3.0106932804076507
Fitness changed from -135.75676627690166 to -138.7674595573093
Iteration 10 complete. Error: -138.7674595573093 Total: 11.7450; Orientation: 0.9721; Line Search: 7.9362
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/acc129b8-0236-4097-b757-12bc3272fa4a.jpg)
Final threshold in iteration 11: -138.7674595573093 (> -Infinity) after 130.389s (< 5400.000s)
Returns
-138.7674595573093