BasicOptimizer.scala:89 executed in 61.85 seconds (1.477 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: 208668460681400
Reset training subject: 208669430798000
Adding measurement 47921550 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=8.730943712122626;dx=-0.006371160265280171
New Minimum: 8.730943712122626 > 8.721957529583086
WOLFE (weak): th(2.154434690031884)=8.721957529583086; dx=-0.0062095774231328334 evalInputDelta=0.0089861825395392
New Minimum: 8.721957529583086 > 8.712962450889243
WOLFE (weak): th(4.308869380063768)=8.712962450889243; dx=-0.006421776503078637 evalInputDelta=0.017981261233382284
New Minimum: 8.712962450889243 > 8.676891815361301
WOLFE (weak): th(12.926608140191302)=8.676891815361301; dx=-0.006292619928506384 evalInputDelta=0.05405189676132416
New Minimum: 8.676891815361301 > 8.515726850518995
WOLFE (weak): th(51.70643256076521)=8.515726850518995; dx=-0.006380214117695404 evalInputDelta=0.21521686160363096
New Minimum: 8.515726850518995 > 7.716906134684004
WOLFE (weak): th(258.53216280382605)=7.716906134684004; dx=-0.006095271870237512 evalInputDelta=1.0140375774386214
New Minimum: 7.716906134684004 > 2.654871421444483
WOLFE (weak): th(1551.1929768229563)=2.654871421444483; dx=-0.00576917938031096 evalInputDelta=6.076072290678143
New Minimum: 2.654871421444483 > -11.067001783257112
END: th(10858.350837760694)=-11.067001783257112; dx=-9.947863623663144E-4 evalInputDelta=19.797945495379736
Fitness changed from 8.730943712122626 to -11.067001783257112
Iteration 1 complete. Error: -11.067001783257112 Total: 8.5329; Orientation: 0.0164; Line Search: 6.1295
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6851dfd0-1864-4827-b51b-8e4d044999fc.jpg)
Adding measurement 561ba949 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-11.067001783257112;dx=-0.014803815418555497
New Minimum: -11.067001783257112 > -26.538559912140798
END: th(23393.607721408407)=-26.538559912140798; dx=-5.767982463658723E-4 evalInputDelta=15.471558128883686
Fitness changed from -11.067001783257112 to -26.538559912140798
Iteration 2 complete. Error: -26.538559912140798 Total: 2.5883; Orientation: 0.0215; Line Search: 1.5352
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a2ba4c12-9c4e-46ac-94bd-c09a96338e14.jpg)
Adding measurement 5034d28a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-26.538559912140798;dx=-0.014866627657919067
New Minimum: -26.538559912140798 > -64.61697766119102
END: th(50400.00000000001)=-64.61697766119102; dx=-6.374596590706045E-4 evalInputDelta=38.07841774905022
Fitness changed from -26.538559912140798 to -64.61697766119102
Iteration 3 complete. Error: -64.61697766119102 Total: 2.2101; Orientation: 0.0160; Line Search: 1.4632
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/64c66d39-d731-4d33-ab97-db026e825320.jpg)
Adding measurement 4608975e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.625e+03, gradient 1.258e-01, dot -0.181; [9a90da51-59b5-4f2d-8c07-8f59a9dfd8ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.61697766119102, -26.538559912140798, -11.067001783257112, 8.730943712122626
LBFGS Accumulation History: 3 points
Removed measurement 4608975e to history. Total: 3
th(0)=-64.61697766119102;dx=-0.015764914138740843
New Minimum: -64.61697766119102 > -98.108573742908
END: th(108583.50837760697)=-98.108573742908; dx=-2.01371512153141E-5 evalInputDelta=33.49159608171699
Fitness changed from -64.61697766119102 to -98.108573742908
Iteration 4 complete. Error: -98.108573742908 Total: 2.4712; Orientation: 0.2929; Line Search: 1.4536
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/86b6bc06-942b-41b8-864f-96b3491e9c57.jpg)
Adding measurement 63f9dbd2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.392e+03, gradient 1.060e-01, dot -0.152; [9a90da51-59b5-4f2d-8c07-8f59a9dfd8ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.108573742908, -26.538559912140798, -11.067001783257112, 8.730943712122626
LBFGS Accumulation History: 3 points
Removed measurement 63f9dbd2 to history. Total: 3
th(0)=-98.108573742908;dx=-0.01119861837305469
Armijo: th(233936.07721408413)=-66.85220012890859; dx=4.417740425272155E-5 evalInputDelta=-31.256373613999415
New Minimum: -98.108573742908 > -144.34080538096708
END: th(116968.03860704206)=-144.34080538096708; dx=-2.4503337921906367E-4 evalInputDelta=46.232231638059076
Fitness changed from -98.108573742908 to -144.34080538096708
Iteration 5 complete. Error: -144.34080538096708 Total: 3.5618; Orientation: 0.3053; Line Search: 2.4829
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/ad4a4eca-0891-4cb2-af5b-83212e617eec.jpg)
Adding measurement 46835048 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.756e+03, gradient 1.153e-01, dot -0.121; [9a90da51-59b5-4f2d-8c07-8f59a9dfd8ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -144.34080538096708, -26.538559912140798, -11.067001783257112, 8.730943712122626
LBFGS Accumulation History: 3 points
Removed measurement 46835048 to history. Total: 3
th(0)=-144.34080538096708;dx=-0.01330744177953482
Armijo: th(252000.0000000001)=-114.01892416608808; dx=-4.133745685710981E-6 evalInputDelta=-30.321881214879
New Minimum: -144.34080538096708 > -189.42879499362255
END: th(126000.00000000004)=-189.42879499362255; dx=-3.583464921629775E-4 evalInputDelta=45.08798961265546
Fitness changed from -144.34080538096708 to -189.42879499362255
Iteration 6 complete. Error: -189.42879499362255 Total: 3.4391; Orientation: 0.2857; Line Search: 2.3778
Adding measurement 4ed5b463 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.361e+03, gradient 9.803e-02, dot -0.109; [9a90da51-59b5-4f2d-8c07-8f59a9dfd8ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -189.42879499362255, -26.538559912140798, -11.067001783257112, 8.730943712122626
LBFGS Accumulation History: 3 points
Removed measurement 4ed5b463 to history. Total: 3
th(0)=-189.42879499362255;dx=-0.009579354091180142
Armijo: th(271458.77094401745)=-130.27566339863438; dx=1.285989230335706E-4 evalInputDelta=-59.15313159498817
New Minimum: -189.42879499362255 > -266.2246918193188
END: th(135729.38547200873)=-266.2246918193188; dx=-2.7927914884015603E-4 evalInputDelta=76.79589682569627
Fitness changed from -189.42879499362255 to -266.2246918193188
Iteration 7 complete. Error: -266.2246918193188 Total: 3.4150; Orientation: 0.3144; Line Search: 2.3667
Adding measurement 5e2e51d3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.513e+04, gradient 9.438e-02, dot -0.110; [9a90da51-59b5-4f2d-8c07-8f59a9dfd8ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -266.2246918193188, -26.538559912140798, -11.067001783257112, 8.730943712122626
LBFGS Accumulation History: 3 points
Removed measurement 5e2e51d3 to history. Total: 3
th(0)=-266.2246918193188;dx=-0.008787680911130556
Armijo: th(292420.0965176052)=-157.35122099667046; dx=2.0007566382133788E-4 evalInputDelta=-108.87347082264836
New Minimum: -266.2246918193188 > -328.85488222456377
END: th(146210.0482588026)=-328.85488222456377; dx=-6.928083808696146E-5 evalInputDelta=62.630190405244946
Fitness changed from -266.2246918193188 to -328.85488222456377
Iteration 8 complete. Error: -328.85488222456377 Total: 3.2945; Orientation: 0.2816; Line Search: 2.3119
Adding measurement b718a2b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.740e+04, gradient 1.001e-01, dot -0.100; [9a90da51-59b5-4f2d-8c07-8f59a9dfd8ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -328.85488222456377, -26.538559912140798, -11.067001783257112, 8.730943712122626
LBFGS Accumulation History: 3 points
Removed measurement b718a2b to history. Total: 3
th(0)=-328.85488222456377;dx=-0.009995136558987875
Armijo: th(315000.0000000001)=-144.8154966926428; dx=2.528598377310843E-4 evalInputDelta=-184.03938553192097
New Minimum: -328.85488222456377 > -354.5260961116807
END: th(157500.00000000006)=-354.5260961116807; dx=-5.541922034813452E-5 evalInputDelta=25.67121388711695
Fitness changed from -328.85488222456377 to -354.5260961116807
Iteration 9 complete. Error: -354.5260961116807 Total: 3.4424; Orientation: 0.2921; Line Search: 2.4467
Adding measurement 52edb32e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.793e+04, gradient 1.006e-01, dot -0.105; [9a90da51-59b5-4f2d-8c07-8f59a9dfd8ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -354.5260961116807, -26.538559912140798, -11.067001783257112, 8.730943712122626
LBFGS Accumulation History: 3 points
Removed measurement 52edb32e to history. Total: 3
th(0)=-354.5260961116807;dx=-0.010056523333371092
Armijo: th(339323.4636800218)=-183.04199468341938; dx=2.923861176548522E-4 evalInputDelta=-171.48410142826134
New Minimum: -354.5260961116807 > -413.3777428920232
END: th(169661.7318400109)=-413.3777428920232; dx=-1.9243097834073348E-4 evalInputDelta=58.85164678034249
Fitness changed from -354.5260961116807 to -413.3777428920232
Iteration 10 complete. Error: -413.3777428920232 Total: 3.3096; Orientation: 0.2879; Line Search: 2.3156
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/30d4f4a7-e182-426b-80fb-48e235f5fec0.jpg)
Adding measurement 3f1f6e7f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.987e+05, gradient 1.018e-01, dot -0.095; [9a90da51-59b5-4f2d-8c07-8f59a9dfd8ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -413.3777428920232, -26.538559912140798, -11.067001783257112, 8.730943712122626
LBFGS Accumulation History: 3 points
Removed measurement 3f1f6e7f to history. Total: 3
th(0)=-413.3777428920232;dx=-0.010340050069920458
Armijo: th(365525.1206470065)=-193.7028828427321; dx=3.2121564905523135E-4 evalInputDelta=-219.6748600492911
New Minimum: -413.3777428920232 > -463.5972226100314
END: th(182762.56032350325)=-463.5972226100314; dx=-1.0982729397063947E-4 evalInputDelta=50.21947971800819
Fitness changed from -413.3777428920232 to -463.5972226100314
Iteration 11 complete. Error: -463.5972226100314 Total: 3.4447; Orientation: 0.2913; Line Search: 2.3824
Adding measurement 22c582c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.153e+05, gradient 1.028e-01, dot -0.086; [9a90da51-59b5-4f2d-8c07-8f59a9dfd8ba = 1.000/1.000e+00]
Orientation rejected. Popping history element from -463.5972226100314, -26.538559912140798, -11.067001783257112, 8.730943712122626
LBFGS Accumulation History: 3 points
Removed measurement 22c582c to history. Total: 3
th(0)=-463.5972226100314;dx=-0.010482645233555537
Armijo: th(393750.0000000002)=-218.22161187541235; dx=2.83455469507181E-4 evalInputDelta=-245.37561073461904
New Minimum: -463.5972226100314 > -488.67364147379647
END: th(196875.0000000001)=-488.67364147379647; dx=-5.8732830848573866E-5 evalInputDelta=25.07641886376507
Fitness changed from -463.5972226100314 to -488.67364147379647
Iteration 12 complete. Error: -488.67364147379647 Total: 3.4525; Orientation: 0.2836; Line Search: 2.2578
Adding measurement 657cb534 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 9.466e+03, gradient 1.044e-01, dot 0.021; [9a90da51-59b5-4f2d-8c07-8f59a9dfd8ba = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-488.67364147379647;dx=-21.01732041706864
Armijo: th(424154.3296000273)=346.2628530726912; dx=9.836084420601489E-4 evalInputDelta=-834.9364945464877
Armijo: th(212077.16480001365)=346.24310049403744; dx=0.0019683974081461846 evalInputDelta=-834.9167419678339
Armijo: th(70692.38826667122)=346.1857371274158; dx=0.005894406491289809 evalInputDelta=-834.8593786012123
Armijo: th(17673.097066667804)=346.00645304605365; dx=0.023553534586839328 evalInputDelta=-834.6800945198502
Armijo: th(3534.6194133335607)=344.37122584087444; dx=0.11736158758676829 evalInputDelta=-833.0448673146709
Armijo: th(589.1032355555934)=326.23948319299717; dx=0.6709071943736538 evalInputDelta=-814.9131246667937
Armijo: th(84.15760507937048)=192.25046032807637; dx=2.477483470763168 evalInputDelta=-680.9241018018729
Armijo: th(10.51970063492131)=51.11257020559304; dx=7.497337787763532 evalInputDelta=-539.7862116793895
Armijo: th(1.168855626102368)=-393.4744314626708; dx=-5.879457649535266 evalInputDelta=-95.19921001112567
Armijo: th(0.11688556261023679)=-482.1811525094796; dx=-14.35524710699209 evalInputDelta=-6.492488964316863
Armijo: th(0.010625960237294254)=-488.13733495598035; dx=-17.401866705452996 evalInputDelta=-0.536306517816115
Armijo: th(8.854966864411878E-4)=-488.6295354508492; dx=-17.885268494653655 evalInputDelta=-0.0441060229472896
Armijo: th(6.811512972624522E-5)=-488.6702260035728; dx=-17.53502163674008 evalInputDelta=-0.003415470223671946
Armijo: th(4.8653664090175154E-6)=-488.67340553985343; dx=-17.742345339275655 evalInputDelta=-2.359339430313412E-4
Armijo: th(3.243577606011677E-7)=-488.67359959461317; dx=-17.21760183345514 evalInputDelta=-4.1879183299897704E-5
Armijo: th(2.0272360037572982E-8)=-488.67364147379647; dx=-17.685484104541086 evalInputDelta=0.0
Armijo: th(1.1924917669160578E-9)=-488.67360861327654; dx=-17.327634797882066 evalInputDelta=-3.286051992290595E-5
MIN ALPHA (6.624954260644766E-11): th(0.0)=-488.67364147379647
Fitness changed from -488.67364147379647 to -488.67364147379647
Static Iteration Total: 15.5274; Orientation: 0.2883; Line Search: 14.5201
Iteration 13 failed. Error: -488.67364147379647
Previous Error: 0.0 -> -488.67364147379647
Retrying iteration 13
Reset training subject: 208727150306700
Adding measurement 26f37689 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-488.67364147379647;dx=-0.010852267147481078
END: th(2.1544346900318838E-10)=-488.67364147379647; dx=-0.008330828966773124 evalInputDelta=0.0
Fitness changed from -488.67364147379647 to -488.67364147379647
Static Iteration Total: 3.1623; Orientation: 0.0160; Line Search: 1.7799
Iteration 14 failed. Error: -488.67364147379647
Previous Error: 0.0 -> -488.67364147379647
Optimization terminated 14
Final threshold in iteration 14: -488.67364147379647 (> -Infinity) after 61.852s (< 5400.000s)
Returns
-488.67364147379647