BasicOptimizer.scala:89 executed in 1556.01 seconds (22.409 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: 639244678125600
Reset training subject: 639266770633700
Adding measurement 6126ea4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-43.82032918159048;dx=-8.597654967211276E-6
New Minimum: -43.82032918159048 > -43.82035675076519
WOLFE (weak): th(2.154434690031884)=-43.82035675076519; dx=-8.593905015825963E-6 evalInputDelta=2.756917471202769E-5
New Minimum: -43.82035675076519 > -43.82038649417433
WOLFE (weak): th(4.308869380063768)=-43.82038649417433; dx=-8.592034189008156E-6 evalInputDelta=5.731258384855664E-5
New Minimum: -43.82038649417433 > -43.820501102244265
WOLFE (weak): th(12.926608140191302)=-43.820501102244265; dx=-8.586891442504712E-6 evalInputDelta=1.7192065378424104E-4
New Minimum: -43.820501102244265 > -43.82101811758208
WOLFE (weak): th(51.70643256076521)=-43.82101811758208; dx=-8.572929167987E-6 evalInputDelta=6.889359915973614E-4
New Minimum: -43.82101811758208 > -43.82377204960292
WOLFE (weak): th(258.53216280382605)=-43.82377204960292; dx=-8.59782136239931E-6 evalInputDelta=0.0034428680124420907
New Minimum: -43.82377204960292 > -43.840984033991155
WOLFE (weak): th(1551.1929768229563)=-43.840984033991155; dx=-8.630135310387373E-6 evalInputDelta=0.020654852400674883
New Minimum: -43.840984033991155 > -43.96494701915144
WOLFE (weak): th(10858.350837760694)=-43.96494701915144; dx=-8.596274693614552E-6 evalInputDelta=0.1446178375609577
New Minimum: -43.96494701915144 > -44.979388583729786
WOLFE (weak): th(86866.80670208555)=-44.979388583729786; dx=-8.605411014003056E-6 evalInputDelta=1.159059402139306
New Minimum: -44.979388583729786 > -54.139646403246886
WOLFE (weak): th(781801.26031877)=-54.139646403246886; dx=-8.19434904042144E-6 evalInputDelta=10.319317221656405
New Minimum: -54.139646403246886 > -82.78035990801015
WOLF (strong): th(7818012.6031877)=-82.78035990801015; dx=4.94646318341094E-7 evalInputDelta=38.960030726419674
END: th(4299906.931753235)=-80.77992868346328; dx=-1.7986493823463757E-6 evalInputDelta=36.9595995018728
Fitness changed from -43.82032918159048 to -82.78035990801015
Iteration 1 complete. Error: -82.78035990801015 Total: 325.8687; Orientation: 0.1238; Line Search: 259.9739
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3537948a-c2b5-468d-a168-3602ab1147c3.jpg)
Adding measurement aa1ef91 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-82.78035990801015;dx=-1.3475667930792503E-5
New Minimum: -82.78035990801015 > -110.36067872636313
WOLF (strong): th(9263868.657677729)=-110.36067872636313; dx=2.7190009591138704E-6 evalInputDelta=27.58031881835298
New Minimum: -110.36067872636313 > -128.147723827274
WOLF (strong): th(4631934.328838864)=-128.147723827274; dx=5.786885737386959E-7 evalInputDelta=45.36736391926385
END: th(1543978.1096129548)=-111.11539142880397; dx=-9.149064727027659E-6 evalInputDelta=28.33503152079382
Fitness changed from -82.78035990801015 to -128.147723827274
Iteration 2 complete. Error: -128.147723827274 Total: 109.8371; Orientation: 0.1280; Line Search: 86.7427
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/cc842ccb-a968-4135-8650-a2d17bc1f901.jpg)
Adding measurement 56b7e845 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-128.147723827274;dx=-1.2685499505522075E-5
New Minimum: -128.147723827274 > -162.38945211541568
END: th(3326400.0)=-162.38945211541568; dx=-5.269679056676673E-7 evalInputDelta=34.24172828814167
Fitness changed from -128.147723827274 to -162.38945211541568
Iteration 3 complete. Error: -162.38945211541568 Total: 65.6187; Orientation: 0.1315; Line Search: 43.1378
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/afc27c4d-82a1-4567-8fd6-7245fdee0b10.jpg)
Adding measurement 758f3b7d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.249e+04, gradient 2.945e-03, dot -0.599; [d564f883-87f5-4975-af12-c65e051ec046 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -162.38945211541568, -128.147723827274, -82.78035990801015, -43.82032918159048
LBFGS Accumulation History: 3 points
Removed measurement 758f3b7d to history. Total: 3
th(0)=-162.38945211541568;dx=-8.648539451025258E-6
New Minimum: -162.38945211541568 > -179.40393958415623
WOLF (strong): th(7166511.552922058)=-179.40393958415623; dx=1.60086160052905E-6 evalInputDelta=17.014487468740555
New Minimum: -179.40393958415623 > -185.16299068488024
END: th(3583255.776461029)=-185.16299068488024; dx=-2.3777803280095902E-7 evalInputDelta=22.773538569464563
Fitness changed from -162.38945211541568 to -185.16299068488024
Iteration 4 complete. Error: -185.16299068488024 Total: 90.8559; Orientation: 2.6193; Line Search: 65.5485
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/31cd8f35-ec09-47db-8978-b73702151832.jpg)
Adding measurement 786a694a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.559e+04, gradient 2.907e-03, dot -0.587; [d564f883-87f5-4975-af12-c65e051ec046 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -185.16299068488024, -128.147723827274, -82.78035990801015, -43.82032918159048
LBFGS Accumulation History: 3 points
Removed measurement 786a694a to history. Total: 3
th(0)=-185.16299068488024;dx=-8.352512634010876E-6
New Minimum: -185.16299068488024 > -195.461155649565
WOLF (strong): th(7719890.548064774)=-195.461155649565; dx=1.942518533301209E-6 evalInputDelta=10.298164964684759
New Minimum: -195.461155649565 > -205.6024604906465
WOLF (strong): th(3859945.274032387)=-205.6024604906465; dx=6.482768194847889E-7 evalInputDelta=20.439469805766265
END: th(1286648.4246774623)=-198.66669018430179; dx=-5.037197668620581E-6 evalInputDelta=13.503699499421543
Fitness changed from -185.16299068488024 to -205.6024604906465
Iteration 5 complete. Error: -205.6024604906465 Total: 112.2140; Orientation: 2.6146; Line Search: 87.0654
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/568e56d2-377c-4b1c-93f8-4ca4fe9000c8.jpg)
Adding measurement 476f6a80 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.423e+04, gradient 2.841e-03, dot -0.535; [d564f883-87f5-4975-af12-c65e051ec046 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -205.6024604906465, -128.147723827274, -82.78035990801015, -43.82032918159048
LBFGS Accumulation History: 3 points
Removed measurement 476f6a80 to history. Total: 3
th(0)=-205.6024604906465;dx=-8.080254773807558E-6
New Minimum: -205.6024604906465 > -226.02235021509563
END: th(2772000.0)=-226.02235021509563; dx=-1.0980851041333576E-6 evalInputDelta=20.41988972444912
Fitness changed from -205.6024604906465 to -226.02235021509563
Iteration 6 complete. Error: -226.02235021509563 Total: 68.5995; Orientation: 2.5261; Line Search: 43.7094
Adding measurement 3a8b2f4e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.069e+05, gradient 2.093e-03, dot -0.674; [d564f883-87f5-4975-af12-c65e051ec046 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -226.02235021509563, -128.147723827274, -82.78035990801015, -43.82032918159048
LBFGS Accumulation History: 3 points
Removed measurement 3a8b2f4e to history. Total: 3
th(0)=-226.02235021509563;dx=-4.413396276807143E-6
New Minimum: -226.02235021509563 > -245.51657519157163
END: th(5972092.960768382)=-245.51657519157163; dx=-5.108740831963732E-7 evalInputDelta=19.494224976476005
Fitness changed from -226.02235021509563 to -245.51657519157163
Iteration 7 complete. Error: -245.51657519157163 Total: 67.1051; Orientation: 2.6122; Line Search: 43.3958
Adding measurement 42760fce to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.014e+05, gradient 2.626e-03, dot -0.506; [d564f883-87f5-4975-af12-c65e051ec046 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -245.51657519157163, -128.147723827274, -82.78035990801015, -43.82032918159048
LBFGS Accumulation History: 3 points
Removed measurement 42760fce to history. Total: 3
th(0)=-245.51657519157163;dx=-6.89512384190738E-6
Armijo: th(1.2866484246774625E7)=-234.05454277774356; dx=2.088628756030677E-6 evalInputDelta=-11.46203241382807
New Minimum: -245.51657519157163 > -259.26212653906816
WOLF (strong): th(6433242.1233873125)=-259.26212653906816; dx=2.116718432171007E-6 evalInputDelta=13.74555134749653
New Minimum: -259.26212653906816 > -262.2937879622037
END: th(2144414.0411291043)=-262.2937879622037; dx=-2.842562231372599E-6 evalInputDelta=16.777212770632048
Fitness changed from -245.51657519157163 to -262.2937879622037
Iteration 8 complete. Error: -262.2937879622037 Total: 111.6807; Orientation: 2.5469; Line Search: 87.4601
Adding measurement 78d0f5f8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.142e+05, gradient 1.694e-03, dot -0.714; [d564f883-87f5-4975-af12-c65e051ec046 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -262.2937879622037, -128.147723827274, -82.78035990801015, -43.82032918159048
LBFGS Accumulation History: 3 points
Removed measurement 78d0f5f8 to history. Total: 3
th(0)=-262.2937879622037;dx=-2.857835004545829E-6
New Minimum: -262.2937879622037 > -278.78136195731463
END: th(4620000.000000001)=-278.78136195731463; dx=-1.7886778837966491E-6 evalInputDelta=16.48757399511095
Fitness changed from -262.2937879622037 to -278.78136195731463
Iteration 9 complete. Error: -278.78136195731463 Total: 67.2930; Orientation: 2.5220; Line Search: 43.6735
Adding measurement 519335db to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.266e+05, gradient 1.739e-03, dot -0.673; [d564f883-87f5-4975-af12-c65e051ec046 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -278.78136195731463, -128.147723827274, -82.78035990801015, -43.82032918159048
LBFGS Accumulation History: 3 points
Removed measurement 519335db to history. Total: 3
th(0)=-278.78136195731463;dx=-3.004135032066407E-6
New Minimum: -278.78136195731463 > -300.71756299968206
END: th(9953488.267947305)=-300.71756299968206; dx=-5.630456560982403E-7 evalInputDelta=21.93620104236743
Fitness changed from -278.78136195731463 to -300.71756299968206
Iteration 10 complete. Error: -300.71756299968206 Total: 67.9166; Orientation: 3.0858; Line Search: 43.3902
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a65d9e03-fc57-46ca-bed7-fd34e5f1b83a.jpg)
Adding measurement 512f67d1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.182e+05, gradient 2.260e-03, dot -0.471; [d564f883-87f5-4975-af12-c65e051ec046 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -300.71756299968206, -128.147723827274, -82.78035990801015, -43.82032918159048
LBFGS Accumulation History: 3 points
Removed measurement 512f67d1 to history. Total: 3
th(0)=-300.71756299968206;dx=-5.1078343415908245E-6
Armijo: th(2.1444140411291044E7)=-274.27278642259347; dx=1.6985301572775665E-6 evalInputDelta=-26.44477657708859
New Minimum: -300.71756299968206 > -310.47490631189936
WOLF (strong): th(1.0722070205645522E7)=-310.47490631189936; dx=1.9143136968785233E-6 evalInputDelta=9.757343312217301
New Minimum: -310.47490631189936 > -320.1294185088327
END: th(3574023.4018818405)=-320.1294185088327; dx=-1.6198590804548518E-6 evalInputDelta=19.411855509150655
Fitness changed from -300.71756299968206 to -320.1294185088327
Iteration 11 complete. Error: -320.1294185088327 Total: 110.6887; Orientation: 2.5332; Line Search: 86.1770
Adding measurement 1a758543 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.262e+05, gradient 1.554e-03, dot -0.632; [d564f883-87f5-4975-af12-c65e051ec046 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -320.1294185088327, -128.147723827274, -82.78035990801015, -43.82032918159048
LBFGS Accumulation History: 3 points
Removed measurement 1a758543 to history. Total: 3
th(0)=-320.1294185088327;dx=-2.407508410657205E-6
New Minimum: -320.1294185088327 > -337.8005680839334
END: th(7700000.000000002)=-337.8005680839334; dx=-7.024925415633525E-7 evalInputDelta=17.671149575100685
Fitness changed from -320.1294185088327 to -337.8005680839334
Iteration 12 complete. Error: -337.8005680839334 Total: 67.6293; Orientation: 2.4899; Line Search: 43.7613
Adding measurement 605de37b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.336e+05, gradient 1.799e-03, dot -0.527; [d564f883-87f5-4975-af12-c65e051ec046 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -337.8005680839334, -128.147723827274, -82.78035990801015, -43.82032918159048
LBFGS Accumulation History: 3 points
Removed measurement 605de37b to history. Total: 3
th(0)=-337.8005680839334;dx=-3.224580548865642E-6
Armijo: th(1.658914711324551E7)=-337.11880105273843; dx=1.0713071182953915E-6 evalInputDelta=-0.6817670311949655
New Minimum: -337.8005680839334 > -350.3123880405418
WOLF (strong): th(8294573.556622755)=-350.3123880405418; dx=5.559477653971025E-7 evalInputDelta=12.511819956608406
END: th(2764857.852207585)=-348.3098134709791; dx=-1.5111735238875847E-6 evalInputDelta=10.509245387045723
Fitness changed from -337.8005680839334 to -350.3123880405418
Iteration 13 complete. Error: -350.3123880405418 Total: 110.6850; Orientation: 2.4672; Line Search: 87.1644
Adding measurement 21155717 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.317e+05, gradient 2.134e-03, dot -0.428; [d564f883-87f5-4975-af12-c65e051ec046 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -350.3123880405418, -128.147723827274, -82.78035990801015, -43.82032918159048
LBFGS Accumulation History: 3 points
Removed measurement 21155717 to history. Total: 3
th(0)=-350.3123880405418;dx=-4.539688343409985E-6
New Minimum: -350.3123880405418 > -369.6487087030663
WOLF (strong): th(5956705.669803068)=-369.6487087030663; dx=5.86314987930448E-7 evalInputDelta=19.336320662524486
END: th(2978352.834901534)=-366.66526485923305; dx=-2.1034630404776936E-6 evalInputDelta=16.352876818691243
Fitness changed from -350.3123880405418 to -369.6487087030663
Iteration 14 complete. Error: -369.6487087030663 Total: 88.2744; Orientation: 2.4980; Line Search: 64.6251
Adding measurement 4a6838ec to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.332e+05, gradient 1.712e-03, dot -0.492; [d564f883-87f5-4975-af12-c65e051ec046 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -369.6487087030663, -128.147723827274, -82.78035990801015, -43.82032918159048
LBFGS Accumulation History: 3 points
Removed measurement 4a6838ec to history. Total: 3
th(0)=-369.6487087030663;dx=-2.9274187353366007E-6
New Minimum: -369.6487087030663 > -382.53790348756013
WOLF (strong): th(6416666.666666669)=-382.53790348756013; dx=2.2359092702731796E-7 evalInputDelta=12.889194784493839
END: th(3208333.3333333344)=-380.5331544727298; dx=-1.2032073628747324E-6 evalInputDelta=10.8844457696635
Fitness changed from -369.6487087030663 to -382.53790348756013
Iteration 15 complete. Error: -382.53790348756013 Total: 90.6588; Orientation: 2.5100; Line Search: 66.5168
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/79680ada-1b06-4fe3-aa26-5775c38d0851.jpg)
Final threshold in iteration 16: -382.53790348756013 (> -Infinity) after 1556.013s (< 5400.000s)
Returns
-382.53790348756013