BasicOptimizer.scala:89 executed in 46.36 seconds (0.869 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: 218649535325400
Reset training subject: 218650158047300
Adding measurement 7b7b670a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-5.89643843269399;dx=-2.814526431526486E-4
New Minimum: -5.89643843269399 > -5.896818492693633
WOLFE (weak): th(2.154434690031884)=-5.896818492693633; dx=-2.8146722842676576E-4 evalInputDelta=3.8005999964330073E-4
New Minimum: -5.896818492693633 > -5.897198256222578
WOLFE (weak): th(4.308869380063768)=-5.897198256222578; dx=-2.8121519104037544E-4 evalInputDelta=7.59823528587944E-4
New Minimum: -5.897198256222578 > -5.898718132507698
WOLFE (weak): th(12.926608140191302)=-5.898718132507698; dx=-2.812436321205362E-4 evalInputDelta=0.0022796998137080138
New Minimum: -5.898718132507698 > -5.905561081655885
WOLFE (weak): th(51.70643256076521)=-5.905561081655885; dx=-2.816298411023228E-4 evalInputDelta=0.009122648961895408
New Minimum: -5.905561081655885 > -5.942164723087047
WOLFE (weak): th(258.53216280382605)=-5.942164723087047; dx=-2.8221935338494956E-4 evalInputDelta=0.04572629039305731
New Minimum: -5.942164723087047 > -6.174073096323285
WOLFE (weak): th(1551.1929768229563)=-6.174073096323285; dx=-2.8139270592528794E-4 evalInputDelta=0.27763466362929545
New Minimum: -6.174073096323285 > -7.883516284426213
END: th(10858.350837760694)=-7.883516284426213; dx=-2.4900331456772585E-4 evalInputDelta=1.9870778517322236
Fitness changed from -5.89643843269399 to -7.883516284426213
Iteration 1 complete. Error: -7.883516284426213 Total: 6.7468; Orientation: 0.0177; Line Search: 4.9776
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5469cda0-14fa-410a-9876-fc6f933b41df.jpg)
Adding measurement 671d514 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-7.883516284426213;dx=-3.3867947683559834E-4
New Minimum: -7.883516284426213 > -11.445277041767628
END: th(23393.607721408407)=-11.445277041767628; dx=-1.631442294025407E-4 evalInputDelta=3.561760757341415
Fitness changed from -7.883516284426213 to -11.445277041767628
Iteration 2 complete. Error: -11.445277041767628 Total: 1.8218; Orientation: 0.0168; Line Search: 1.2144
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/4fb2a7bd-2eb1-47cf-aeea-9e3773636d58.jpg)
Adding measurement 779403be to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-11.445277041767628;dx=-4.094645373652431E-4
New Minimum: -11.445277041767628 > -15.106906402021094
END: th(50400.00000000001)=-15.106906402021094; dx=-8.304331750725092E-5 evalInputDelta=3.6616293602534657
Fitness changed from -11.445277041767628 to -15.106906402021094
Iteration 3 complete. Error: -15.106906402021094 Total: 2.0672; Orientation: 0.0155; Line Search: 1.1840
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/f611bffd-418e-4cd4-97d8-8ec1acfedf65.jpg)
Adding measurement 6d60349d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.071e+04, gradient 1.944e-02, dot -0.201; [12a893c7-aed5-4d69-8fce-782f636b8f5f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.106906402021094, -11.445277041767628, -7.883516284426213, -5.89643843269399
LBFGS Accumulation History: 3 points
Removed measurement 6d60349d to history. Total: 3
th(0)=-15.106906402021094;dx=-3.774115471104881E-4
New Minimum: -15.106906402021094 > -15.656189685573505
END: th(108583.50837760697)=-15.656189685573505; dx=-2.7231576399825914E-5 evalInputDelta=0.5492832835524109
Fitness changed from -15.106906402021094 to -15.656189685573505
Iteration 4 complete. Error: -15.656189685573505 Total: 2.3468; Orientation: 0.3335; Line Search: 1.3960
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/57d2a363-e47b-42d5-bd13-0666990873c3.jpg)
Adding measurement 1cde2ed7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.616e+03, gradient 1.883e-02, dot -0.137; [12a893c7-aed5-4d69-8fce-782f636b8f5f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.656189685573505, -11.445277041767628, -7.883516284426213, -5.89643843269399
LBFGS Accumulation History: 3 points
Removed measurement 1cde2ed7 to history. Total: 3
th(0)=-15.656189685573505;dx=-3.542624848095872E-4
Armijo: th(233936.07721408413)=-14.030206243968792; dx=-4.2398604753611636E-6 evalInputDelta=-1.6259834416047134
New Minimum: -15.656189685573505 > -20.977418055161134
END: th(116968.03860704206)=-20.977418055161134; dx=-5.066863212641908E-5 evalInputDelta=5.3212283695876295
Fitness changed from -15.656189685573505 to -20.977418055161134
Iteration 5 complete. Error: -20.977418055161134 Total: 4.4461; Orientation: 0.3035; Line Search: 3.5367
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/7e407cdd-e57f-4669-8184-fd62a7091140.jpg)
Adding measurement 18a1f0a1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.419e+03, gradient 1.746e-02, dot -0.094; [12a893c7-aed5-4d69-8fce-782f636b8f5f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -20.977418055161134, -11.445277041767628, -7.883516284426213, -5.89643843269399
LBFGS Accumulation History: 3 points
Removed measurement 18a1f0a1 to history. Total: 3
th(0)=-20.977418055161134;dx=-3.041864718623767E-4
Armijo: th(252000.0000000001)=-16.784303401259514; dx=-8.68985345756517E-6 evalInputDelta=-4.19311465390162
New Minimum: -20.977418055161134 > -25.25939892160296
END: th(126000.00000000004)=-25.25939892160296; dx=-6.596569886909342E-5 evalInputDelta=4.281980866441824
Fitness changed from -20.977418055161134 to -25.25939892160296
Iteration 6 complete. Error: -25.25939892160296 Total: 2.7523; Orientation: 0.3123; Line Search: 1.8444
Adding measurement d0c3614 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.922e+03, gradient 1.678e-02, dot -0.095; [12a893c7-aed5-4d69-8fce-782f636b8f5f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -25.25939892160296, -11.445277041767628, -7.883516284426213, -5.89643843269399
LBFGS Accumulation History: 3 points
Removed measurement d0c3614 to history. Total: 3
th(0)=-25.25939892160296;dx=-2.811080332902027E-4
Armijo: th(271458.77094401745)=-19.272076666912085; dx=-8.661567671761347E-6 evalInputDelta=-5.9873222546908735
New Minimum: -25.25939892160296 > -28.59296040069183
END: th(135729.38547200873)=-28.59296040069183; dx=-6.20079009257659E-5 evalInputDelta=3.3335614790888712
Fitness changed from -25.25939892160296 to -28.59296040069183
Iteration 7 complete. Error: -28.59296040069183 Total: 3.1842; Orientation: 0.3109; Line Search: 2.3112
Adding measurement 7eba15a1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.941e+03, gradient 1.641e-02, dot -0.086; [12a893c7-aed5-4d69-8fce-782f636b8f5f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.59296040069183, -11.445277041767628, -7.883516284426213, -5.89643843269399
LBFGS Accumulation History: 3 points
Removed measurement 7eba15a1 to history. Total: 3
th(0)=-28.59296040069183;dx=-2.6898797483047783E-4
Armijo: th(292420.0965176052)=-21.339653218370035; dx=-6.933305497295238E-6 evalInputDelta=-7.2533071823217945
New Minimum: -28.59296040069183 > -31.648731655618967
END: th(146210.0482588026)=-31.648731655618967; dx=-5.950426169413592E-5 evalInputDelta=3.055771254927137
Fitness changed from -28.59296040069183 to -31.648731655618967
Iteration 8 complete. Error: -31.648731655618967 Total: 2.7211; Orientation: 0.3028; Line Search: 1.8694
Adding measurement 6a80985 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.131e+03, gradient 1.573e-02, dot -0.092; [12a893c7-aed5-4d69-8fce-782f636b8f5f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -31.648731655618967, -11.445277041767628, -7.883516284426213, -5.89643843269399
LBFGS Accumulation History: 3 points
Removed measurement 6a80985 to history. Total: 3
th(0)=-31.648731655618967;dx=-2.473386671969034E-4
Armijo: th(315000.0000000001)=-23.9923636220203; dx=-4.308418980823448E-6 evalInputDelta=-7.6563680335986675
New Minimum: -31.648731655618967 > -34.38979474224143
END: th(157500.00000000006)=-34.38979474224143; dx=-4.8931996682541054E-5 evalInputDelta=2.741063086622461
Fitness changed from -31.648731655618967 to -34.38979474224143
Iteration 9 complete. Error: -34.38979474224143 Total: 2.7992; Orientation: 0.2987; Line Search: 1.8951
Adding measurement 125afe6b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.642e+03, gradient 1.501e-02, dot -0.093; [12a893c7-aed5-4d69-8fce-782f636b8f5f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -34.38979474224143, -11.445277041767628, -7.883516284426213, -5.89643843269399
LBFGS Accumulation History: 3 points
Removed measurement 125afe6b to history. Total: 3
th(0)=-34.38979474224143;dx=-2.2509402339321126E-4
Armijo: th(339323.4636800218)=-25.97935783600213; dx=-3.0298613696429937E-6 evalInputDelta=-8.410436906239298
New Minimum: -34.38979474224143 > -37.19570320280763
END: th(169661.7318400109)=-37.19570320280763; dx=-4.5581702687244135E-5 evalInputDelta=2.805908460566201
Fitness changed from -34.38979474224143 to -37.19570320280763
Iteration 10 complete. Error: -37.19570320280763 Total: 2.8438; Orientation: 0.3186; Line Search: 1.9166
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b772b473-e1fc-4a1a-b7ae-d8a1c5fcaef6.jpg)
Adding measurement 6c7656a3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.029e+04, gradient 1.538e-02, dot -0.099; [12a893c7-aed5-4d69-8fce-782f636b8f5f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.19570320280763, -11.445277041767628, -7.883516284426213, -5.89643843269399
LBFGS Accumulation History: 3 points
Removed measurement 6c7656a3 to history. Total: 3
th(0)=-37.19570320280763;dx=-2.36259521184213E-4
Armijo: th(365525.1206470065)=-25.78289672591373; dx=2.548816995090858E-6 evalInputDelta=-11.412806476893898
New Minimum: -37.19570320280763 > -39.62079230302735
END: th(182762.56032350325)=-39.62079230302735; dx=-4.059141881920111E-5 evalInputDelta=2.425089100219722
Fitness changed from -37.19570320280763 to -39.62079230302735
Iteration 11 complete. Error: -39.62079230302735 Total: 2.9887; Orientation: 0.3206; Line Search: 2.0850
Adding measurement 7d9a90b2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.250e+04, gradient 1.495e-02, dot -0.102; [12a893c7-aed5-4d69-8fce-782f636b8f5f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -39.62079230302735, -11.445277041767628, -7.883516284426213, -5.89643843269399
LBFGS Accumulation History: 3 points
Removed measurement 7d9a90b2 to history. Total: 3
th(0)=-39.62079230302735;dx=-2.231561321385765E-4
Armijo: th(393750.0000000002)=-28.37325320877411; dx=4.867891809490233E-6 evalInputDelta=-11.247539094253241
New Minimum: -39.62079230302735 > -42.66972206088031
END: th(196875.0000000001)=-42.66972206088031; dx=-3.932232827219105E-5 evalInputDelta=3.04892975785296
Fitness changed from -39.62079230302735 to -42.66972206088031
Iteration 12 complete. Error: -42.66972206088031 Total: 2.7145; Orientation: 0.2894; Line Search: 1.8660
Adding measurement 2329641e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.894e+04, gradient 1.419e-02, dot -0.117; [12a893c7-aed5-4d69-8fce-782f636b8f5f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -42.66972206088031, -11.445277041767628, -7.883516284426213, -5.89643843269399
LBFGS Accumulation History: 3 points
Removed measurement 2329641e to history. Total: 3
th(0)=-42.66972206088031;dx=-2.0090878066186425E-4
Armijo: th(424154.3296000273)=-29.140734644435987; dx=5.837400033497154E-6 evalInputDelta=-13.528987416444323
New Minimum: -42.66972206088031 > -44.62662794248534
END: th(212077.16480001365)=-44.62662794248534; dx=-3.822676283550191E-5 evalInputDelta=1.9569058816050315
Fitness changed from -42.66972206088031 to -44.62662794248534
Iteration 13 complete. Error: -44.62662794248534 Total: 2.9031; Orientation: 0.3095; Line Search: 1.8665
Adding measurement 7cc65692 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.053e+04, gradient 1.463e-02, dot -0.112; [12a893c7-aed5-4d69-8fce-782f636b8f5f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.62662794248534, -11.445277041767628, -7.883516284426213, -5.89643843269399
LBFGS Accumulation History: 3 points
Removed measurement 7cc65692 to history. Total: 3
th(0)=-44.62662794248534;dx=-2.1379041684952945E-4
Armijo: th(456906.40080875816)=-27.673155425662372; dx=1.0938850310243314E-5 evalInputDelta=-16.95347251682297
New Minimum: -44.62662794248534 > -45.91509315644491
END: th(228453.20040437908)=-45.91509315644491; dx=-2.887703150728888E-5 evalInputDelta=1.2884652139595687
Fitness changed from -44.62662794248534 to -45.91509315644491
Iteration 14 complete. Error: -45.91509315644491 Total: 2.7131; Orientation: 0.3050; Line Search: 1.8191
Adding measurement 16600c74 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.881e+04, gradient 1.456e-02, dot -0.101; [12a893c7-aed5-4d69-8fce-782f636b8f5f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.91509315644491, -11.445277041767628, -7.883516284426213, -5.89643843269399
LBFGS Accumulation History: 3 points
Removed measurement 16600c74 to history. Total: 3
th(0)=-45.91509315644491;dx=-2.11376042795088E-4
Armijo: th(492187.5000000003)=-25.881493348919918; dx=1.16300392158061E-5 evalInputDelta=-20.033599807524993
New Minimum: -45.91509315644491 > -46.542986748176574
END: th(246093.75000000015)=-46.542986748176574; dx=-2.385764572575739E-5 evalInputDelta=0.627893591731663
Fitness changed from -45.91509315644491 to -46.542986748176574
Iteration 15 complete. Error: -46.542986748176574 Total: 3.2845; Orientation: 0.3199; Line Search: 2.3543
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/acd870a7-4875-4a88-a600-7f04b6e20690.jpg)
Final threshold in iteration 16: -46.542986748176574 (> -Infinity) after 46.355s (< 5400.000s)
Returns
-46.542986748176574