BasicOptimizer.scala:89 executed in 134.10 seconds (1.798 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: 71492074667900
Reset training subject: 71494775497500
Adding measurement 49852876 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-11.467133211738586;dx=-7.441723923745103E-7
New Minimum: -11.467133211738586 > -11.467134337290904
WOLFE (weak): th(2.154434690031884)=-11.467134337290904; dx=-7.352933549283835E-7 evalInputDelta=1.125552318015366E-6
New Minimum: -11.467134337290904 > -11.467136025619176
WOLFE (weak): th(4.308869380063768)=-11.467136025619176; dx=-7.353249247062659E-7 evalInputDelta=2.8138805898692E-6
New Minimum: -11.467136025619176 > -11.467143904481153
WOLFE (weak): th(12.926608140191302)=-11.467143904481153; dx=-7.354506848917851E-7 evalInputDelta=1.0692742566931202E-5
New Minimum: -11.467143904481153 > -11.467176545423099
WOLFE (weak): th(51.70643256076521)=-11.467176545423099; dx=-7.352465133324269E-7 evalInputDelta=4.333368451270303E-5
New Minimum: -11.467176545423099 > -11.46734875299246
WOLFE (weak): th(258.53216280382605)=-11.46734875299246; dx=-7.353541293362347E-7 evalInputDelta=2.1554125387446277E-4
New Minimum: -11.46734875299246 > -11.468423584933578
WOLFE (weak): th(1551.1929768229563)=-11.468423584933578; dx=-7.35255297882852E-7 evalInputDelta=0.0012903731949922559
New Minimum: -11.468423584933578 > -11.476159403237762
WOLFE (weak): th(10858.350837760694)=-11.476159403237762; dx=-7.34511717811139E-7 evalInputDelta=0.00902619149917605
New Minimum: -11.476159403237762 > -11.539057805898548
WOLFE (weak): th(86866.80670208555)=-11.539057805898548; dx=-7.282329995056992E-7 evalInputDelta=0.07192459415996133
New Minimum: -11.539057805898548 > -12.065230619088684
END: th(781801.26031877)=-12.065230619088684; dx=-5.874952173491195E-7 evalInputDelta=0.5980974073500978
Fitness changed from -11.467133211738586 to -12.065230619088684
Iteration 1 complete. Error: -12.065230619088684 Total: 34.3621; Orientation: 0.0600; Line Search: 26.1943
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 7b3b1f7f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-12.065230619088684;dx=-6.159080854024185E-7
New Minimum: -12.065230619088684 > -12.994261070805122
END: th(1684339.7559414052)=-12.994261070805122; dx=-3.582903871871592E-7 evalInputDelta=0.9290304517164376
Fitness changed from -12.065230619088684 to -12.994261070805122
Iteration 2 complete. Error: -12.994261070805122 Total: 8.3975; Orientation: 0.0601; Line Search: 5.0773
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 5431add6 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-12.994261070805122;dx=-6.036749943965514E-7
New Minimum: -12.994261070805122 > -14.104977961646759
END: th(3628800.0)=-14.104977961646759; dx=-1.707840970716467E-7 evalInputDelta=1.110716890841637
Fitness changed from -12.994261070805122 to -14.104977961646759
Iteration 3 complete. Error: -14.104977961646759 Total: 8.4171; Orientation: 0.0591; Line Search: 5.4582
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 536e8ab5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.164e+04, gradient 8.002e-04, dot -0.590; [c0dc0d9c-2c32-4b51-b84d-aa0bb50b2ee6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.104977961646759, -12.994261070805122, -12.065230619088684, -11.467133211738586
LBFGS Accumulation History: 3 points
Removed measurement 536e8ab5 to history. Total: 3
th(0)=-14.104977961646759;dx=-6.398853225481468E-7
New Minimum: -14.104977961646759 > -15.411124304173926
END: th(7818012.6031877)=-15.411124304173926; dx=-6.018316357694266E-8 evalInputDelta=1.3061463425271675
Fitness changed from -14.104977961646759 to -15.411124304173926
Iteration 4 complete. Error: -15.411124304173926 Total: 9.5249; Orientation: 1.0639; Line Search: 5.4173
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 49877016 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.181e+03, gradient 7.199e-04, dot -0.422; [c0dc0d9c-2c32-4b51-b84d-aa0bb50b2ee6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.411124304173926, -12.994261070805122, -12.065230619088684, -11.467133211738586
LBFGS Accumulation History: 3 points
Removed measurement 49877016 to history. Total: 3
th(0)=-15.411124304173926;dx=-5.173050457498773E-7
New Minimum: -15.411124304173926 > -17.733649688313097
END: th(1.684339755941405E7)=-17.733649688313097; dx=-1.3514815716343487E-8 evalInputDelta=2.322525384139171
Fitness changed from -15.411124304173926 to -17.733649688313097
Iteration 5 complete. Error: -17.733649688313097 Total: 9.6015; Orientation: 1.0274; Line Search: 5.2535
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 44fa3f17 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.258e+04, gradient 6.413e-04, dot -0.311; [c0dc0d9c-2c32-4b51-b84d-aa0bb50b2ee6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.733649688313097, -12.994261070805122, -12.065230619088684, -11.467133211738586
LBFGS Accumulation History: 3 points
Removed measurement 44fa3f17 to history. Total: 3
th(0)=-17.733649688313097;dx=-4.1085371654602315E-7
New Minimum: -17.733649688313097 > -20.77407468066295
WOLF (strong): th(3.6288E7)=-20.77407468066295; dx=9.466521185277179E-9 evalInputDelta=3.040424992349852
New Minimum: -20.77407468066295 > -21.025208791095526
END: th(1.8144E7)=-21.025208791095526; dx=-1.3199873037698919E-9 evalInputDelta=3.291559102782429
Fitness changed from -17.733649688313097 to -21.025208791095526
Iteration 6 complete. Error: -21.025208791095526 Total: 11.8602; Orientation: 1.0530; Line Search: 7.8161
Adding measurement 89bfc28 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.742e+04, gradient 6.293e-04, dot -0.311; [c0dc0d9c-2c32-4b51-b84d-aa0bb50b2ee6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -21.025208791095526, -12.994261070805122, -12.065230619088684, -11.467133211738586
LBFGS Accumulation History: 3 points
Removed measurement 89bfc28 to history. Total: 3
th(0)=-21.025208791095526;dx=-3.9559427955657383E-7
New Minimum: -21.025208791095526 > -22.809489295864676
WOLF (strong): th(3.90900630159385E7)=-22.809489295864676; dx=2.94162555766167E-8 evalInputDelta=1.78428050476915
New Minimum: -22.809489295864676 > -23.704410440108113
WOLF (strong): th(1.954503150796925E7)=-23.704410440108113; dx=3.926115809025548E-8 evalInputDelta=2.6792016490125867
END: th(6515010.502656416)=-23.373309897677746; dx=-1.8746406665226092E-7 evalInputDelta=2.34810110658222
Fitness changed from -21.025208791095526 to -23.704410440108113
Iteration 7 complete. Error: -23.704410440108113 Total: 14.2030; Orientation: 1.0176; Line Search: 10.6872
Adding measurement bcbbcf8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.261e+04, gradient 6.152e-04, dot -0.301; [c0dc0d9c-2c32-4b51-b84d-aa0bb50b2ee6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -23.704410440108113, -12.994261070805122, -12.065230619088684, -11.467133211738586
LBFGS Accumulation History: 3 points
Removed measurement bcbbcf8 to history. Total: 3
th(0)=-23.704410440108113;dx=-3.7799909251023E-7
New Minimum: -23.704410440108113 > -26.67090873068858
WOLF (strong): th(1.4036164632845044E7)=-26.67090873068858; dx=1.4716133520231172E-8 evalInputDelta=2.9664982905804678
END: th(7018082.316422522)=-26.153608331713333; dx=-1.8716448540263714E-7 evalInputDelta=2.4491978916052197
Fitness changed from -23.704410440108113 to -26.67090873068858
Iteration 8 complete. Error: -26.67090873068858 Total: 11.3266; Orientation: 1.0128; Line Search: 7.9078
Adding measurement 501bfb85 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.169e+04, gradient 6.137e-04, dot -0.329; [c0dc0d9c-2c32-4b51-b84d-aa0bb50b2ee6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -26.67090873068858, -12.994261070805122, -12.065230619088684, -11.467133211738586
LBFGS Accumulation History: 3 points
Removed measurement 501bfb85 to history. Total: 3
th(0)=-26.67090873068858;dx=-3.7657285676408277E-7
New Minimum: -26.67090873068858 > -28.05276136823616
WOLF (strong): th(1.5120000000000002E7)=-28.05276136823616; dx=8.379541374205653E-8 evalInputDelta=1.3818526375475777
New Minimum: -28.05276136823616 > -28.604856453327276
END: th(7560000.000000001)=-28.604856453327276; dx=-1.5318377047322754E-8 evalInputDelta=1.9339477226386954
Fitness changed from -26.67090873068858 to -28.604856453327276
Iteration 9 complete. Error: -28.604856453327276 Total: 11.4797; Orientation: 1.0070; Line Search: 7.8964
Adding measurement 7fae6d98 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.097e+04, gradient 6.103e-04, dot -0.357; [c0dc0d9c-2c32-4b51-b84d-aa0bb50b2ee6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.604856453327276, -12.994261070805122, -12.065230619088684, -11.467133211738586
LBFGS Accumulation History: 3 points
Removed measurement 7fae6d98 to history. Total: 3
th(0)=-28.604856453327276;dx=-3.720408193432208E-7
Armijo: th(1.6287526256641043E7)=-28.594770986061253; dx=4.674375643970027E-8 evalInputDelta=-0.010085467266023329
New Minimum: -28.604856453327276 > -29.274846293084995
WOLF (strong): th(8143763.128320522)=-29.274846293084995; dx=9.066855093262847E-8 evalInputDelta=0.6699898397577186
New Minimum: -29.274846293084995 > -29.477256384890747
END: th(2714587.709440174)=-29.477256384890747; dx=-1.5151068138030114E-7 evalInputDelta=0.8723999315634714
Fitness changed from -28.604856453327276 to -29.477256384890747
Iteration 10 complete. Error: -29.477256384890747 Total: 14.3959; Orientation: 0.9822; Line Search: 10.7180
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -29.477256384890747 (> -Infinity) after 134.097s (< 5400.000s)
Returns
-29.477256384890747