BasicOptimizer.scala:89 executed in 12.00 seconds (0.286 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: 568391163412800
Reset training subject: 568391358948500
Adding measurement 6abdaa0b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2.0678121536318064;dx=-8.85940910441725E-6
New Minimum: -2.0678121536318064 > -2.0678595290932025
WOLFE (weak): th(2.154434690031884)=-2.0678595290932025; dx=-8.879101103376579E-6 evalInputDelta=4.737546139610416E-5
New Minimum: -2.0678595290932025 > -2.0679065019960303
WOLFE (weak): th(4.308869380063768)=-2.0679065019960303; dx=-8.878846642216836E-6 evalInputDelta=9.434836422395065E-5
New Minimum: -2.0679065019960303 > -2.0680946505628204
WOLFE (weak): th(12.926608140191302)=-2.0680946505628204; dx=-8.79254764153982E-6 evalInputDelta=2.824969310140091E-4
New Minimum: -2.0680946505628204 > -2.0689403048302206
WOLFE (weak): th(51.70643256076521)=-2.0689403048302206; dx=-8.753971167673728E-6 evalInputDelta=0.0011281511984142512
New Minimum: -2.0689403048302206 > -2.0734548461509092
WOLFE (weak): th(258.53216280382605)=-2.0734548461509092; dx=-8.876860310511223E-6 evalInputDelta=0.0056426925191028765
New Minimum: -2.0734548461509092 > -2.1017944059190654
WOLFE (weak): th(1551.1929768229563)=-2.1017944059190654; dx=-8.948495446116502E-6 evalInputDelta=0.03398225228725904
New Minimum: -2.1017944059190654 > -2.313671443270591
WOLFE (weak): th(10858.350837760694)=-2.313671443270591; dx=-9.455292289119315E-6 evalInputDelta=0.24585928963878478
New Minimum: -2.313671443270591 > -4.0764603514931075
WOLFE (weak): th(86866.80670208555)=-4.0764603514931075; dx=-8.113451117989706E-6 evalInputDelta=2.008648197861301
New Minimum: -4.0764603514931075 > -5.894247469220322
WOLF (strong): th(781801.26031877)=-5.894247469220322; dx=2.6131871217914567E-7 evalInputDelta=3.826435315588516
New Minimum: -5.894247469220322 > -6.250567402016683
END: th(434334.03351042775)=-6.250567402016683; dx=-1.619368897573757E-7 evalInputDelta=4.182755248384877
Fitness changed from -2.0678121536318064 to -6.250567402016683
Iteration 1 complete. Error: -6.250567402016683 Total: 2.2834; Orientation: 0.0022; Line Search: 1.7698
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/79244b22-f940-460d-b82e-c5e9104323f5.jpg)
Adding measurement 27eab1c8 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-6.250567402016683;dx=-1.3576373945600273E-5
New Minimum: -6.250567402016683 > -8.583704311693552
WOLF (strong): th(935744.3088563363)=-8.583704311693552; dx=7.971200414703547E-7 evalInputDelta=2.3331369096768686
New Minimum: -8.583704311693552 > -10.30496792354594
WOLF (strong): th(467872.15442816814)=-10.30496792354594; dx=1.2151375459201115E-6 evalInputDelta=4.0544005215292565
END: th(155957.3848093894)=-9.885424095865881; dx=-5.131795562272758E-6 evalInputDelta=3.6348566938491977
Fitness changed from -6.250567402016683 to -10.30496792354594
Iteration 2 complete. Error: -10.30496792354594 Total: 0.8232; Orientation: 0.0022; Line Search: 0.6470
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e7fc7212-f558-4eaf-82ef-8eef81f8dbe6.jpg)
Adding measurement 4759e10d to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-10.30496792354594;dx=-1.2821276172609871E-5
New Minimum: -10.30496792354594 > -15.998863995106118
END: th(336000.00000000006)=-15.998863995106118; dx=-1.4687962712471087E-6 evalInputDelta=5.693896071560179
Fitness changed from -10.30496792354594 to -15.998863995106118
Iteration 3 complete. Error: -15.998863995106118 Total: 0.5066; Orientation: 0.0022; Line Search: 0.3258
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/a038c1ec-6ca8-43e4-88f7-c2309f46165a.jpg)
Adding measurement 2f8325c1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.302e+03, gradient 2.653e-03, dot -0.573; [5196e8de-c0c5-4786-a5a3-3bffafc84722 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.998863995106118, -10.30496792354594, -6.250567402016683, -2.0678121536318064
LBFGS Accumulation History: 3 points
Removed measurement 2f8325c1 to history. Total: 3
th(0)=-15.998863995106118;dx=-6.989358326510748E-6
New Minimum: -15.998863995106118 > -20.7498570287734
END: th(723890.055850713)=-20.7498570287734; dx=-4.310481068394229E-7 evalInputDelta=4.75099303366728
Fitness changed from -15.998863995106118 to -20.7498570287734
Iteration 4 complete. Error: -20.7498570287734 Total: 0.5375; Orientation: 0.0423; Line Search: 0.3216
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/8bc652f3-a2cd-4ab6-b50a-da1581194042.jpg)
Adding measurement 175cd3b3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.054e+04, gradient 3.385e-03, dot -0.502; [5196e8de-c0c5-4786-a5a3-3bffafc84722 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -20.7498570287734, -10.30496792354594, -6.250567402016683, -2.0678121536318064
LBFGS Accumulation History: 3 points
Removed measurement 175cd3b3 to history. Total: 3
th(0)=-20.7498570287734;dx=-1.1402633297817662E-5
New Minimum: -20.7498570287734 > -21.095186630760896
WOLF (strong): th(1559573.848093894)=-21.095186630760896; dx=2.223523290418633E-6 evalInputDelta=0.3453296019874976
New Minimum: -21.095186630760896 > -26.20201105566921
WOLF (strong): th(779786.924046947)=-26.20201105566921; dx=1.9414695063649663E-6 evalInputDelta=5.452154026895812
END: th(259928.9746823157)=-25.840917676363876; dx=-5.154592670114522E-6 evalInputDelta=5.091060647590478
Fitness changed from -20.7498570287734 to -26.20201105566921
Iteration 5 complete. Error: -26.20201105566921 Total: 0.8539; Orientation: 0.0395; Line Search: 0.6435
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/6df6a7ee-8601-47d7-bd23-8331920bfe50.jpg)
Adding measurement 3df58aef to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.073e+04, gradient 3.678e-03, dot -0.441; [5196e8de-c0c5-4786-a5a3-3bffafc84722 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -26.20201105566921, -10.30496792354594, -6.250567402016683, -2.0678121536318064
LBFGS Accumulation History: 3 points
Removed measurement 3df58aef to history. Total: 3
th(0)=-26.20201105566921;dx=-1.3480710232168943E-5
New Minimum: -26.20201105566921 > -35.33558803309433
END: th(560000.0000000002)=-35.33558803309433; dx=-8.211046982314955E-7 evalInputDelta=9.133576977425122
Fitness changed from -26.20201105566921 to -35.33558803309433
Iteration 6 complete. Error: -35.33558803309433 Total: 0.8573; Orientation: 0.0420; Line Search: 0.6447
Adding measurement 5e9a3c85 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.055e+04, gradient 2.757e-03, dot -0.595; [5196e8de-c0c5-4786-a5a3-3bffafc84722 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -35.33558803309433, -10.30496792354594, -6.250567402016683, -2.0678121536318064
LBFGS Accumulation History: 3 points
Removed measurement 5e9a3c85 to history. Total: 3
th(0)=-35.33558803309433;dx=-7.587070395215896E-6
New Minimum: -35.33558803309433 > -41.18071318385176
WOLF (strong): th(1206483.4264178555)=-41.18071318385176; dx=8.91855938631096E-7 evalInputDelta=5.845125150757426
New Minimum: -41.18071318385176 > -41.25461600010236
END: th(603241.7132089278)=-41.25461600010236; dx=-1.5454383323608032E-6 evalInputDelta=5.919027967008027
Fitness changed from -35.33558803309433 to -41.25461600010236
Iteration 7 complete. Error: -41.25461600010236 Total: 0.6765; Orientation: 0.0398; Line Search: 0.4781
Adding measurement 4d563dd0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.976e+04, gradient 2.662e-03, dot -0.583; [5196e8de-c0c5-4786-a5a3-3bffafc84722 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -41.25461600010236, -10.30496792354594, -6.250567402016683, -2.0678121536318064
LBFGS Accumulation History: 3 points
Removed measurement 4d563dd0 to history. Total: 3
th(0)=-41.25461600010236;dx=-7.043120048440085E-6
New Minimum: -41.25461600010236 > -45.877238701945096
WOLF (strong): th(1299644.8734115788)=-45.877238701945096; dx=9.681801358424382E-7 evalInputDelta=4.622622701842737
New Minimum: -45.877238701945096 > -46.35709994022206
END: th(649822.4367057894)=-46.35709994022206; dx=-8.537860437797104E-7 evalInputDelta=5.102483940119697
Fitness changed from -41.25461600010236 to -46.35709994022206
Iteration 8 complete. Error: -46.35709994022206 Total: 0.6715; Orientation: 0.0398; Line Search: 0.4693
Adding measurement 1765c24d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.680e+04, gradient 2.721e-03, dot -0.548; [5196e8de-c0c5-4786-a5a3-3bffafc84722 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.35709994022206, -10.30496792354594, -6.250567402016683, -2.0678121536318064
LBFGS Accumulation History: 3 points
Removed measurement 1765c24d to history. Total: 3
th(0)=-46.35709994022206;dx=-7.376168694885899E-6
New Minimum: -46.35709994022206 > -49.685378348548475
WOLF (strong): th(1400000.000000001)=-49.685378348548475; dx=1.930309583110896E-6 evalInputDelta=3.328278408326419
New Minimum: -49.685378348548475 > -51.492055850942414
WOLF (strong): th(700000.0000000005)=-51.492055850942414; dx=1.0381464349831521E-7 evalInputDelta=5.1349559107203575
END: th(233333.3333333335)=-49.39716269315526; dx=-4.761475332428209E-6 evalInputDelta=3.0400627529332027
Fitness changed from -46.35709994022206 to -51.492055850942414
Iteration 9 complete. Error: -51.492055850942414 Total: 0.8274; Orientation: 0.0396; Line Search: 0.6305
Adding measurement 34bc45c6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.011e+04, gradient 2.735e-03, dot -0.499; [5196e8de-c0c5-4786-a5a3-3bffafc84722 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -51.492055850942414, -10.30496792354594, -6.250567402016683, -2.0678121536318064
LBFGS Accumulation History: 3 points
Removed measurement 34bc45c6 to history. Total: 3
th(0)=-51.492055850942414;dx=-7.4452280570965515E-6
New Minimum: -51.492055850942414 > -56.167388736700104
END: th(502701.42767410656)=-56.167388736700104; dx=-1.126322244490923E-6 evalInputDelta=4.67533288575769
Fitness changed from -51.492055850942414 to -56.167388736700104
Iteration 10 complete. Error: -56.167388736700104 Total: 0.5123; Orientation: 0.0423; Line Search: 0.3148
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b5e38609-d4a2-4ff3-9766-e79d7d1858e7.jpg)
Adding measurement 137f6567 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.325e+04, gradient 2.129e-03, dot -0.612; [5196e8de-c0c5-4786-a5a3-3bffafc84722 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -56.167388736700104, -10.30496792354594, -6.250567402016683, -2.0678121536318064
LBFGS Accumulation History: 3 points
Removed measurement 137f6567 to history. Total: 3
th(0)=-56.167388736700104;dx=-4.515623726434982E-6
New Minimum: -56.167388736700104 > -61.22792146892589
END: th(1083037.3945096491)=-61.22792146892589; dx=-2.1582930949005544E-7 evalInputDelta=5.060532732225788
Fitness changed from -56.167388736700104 to -61.22792146892589
Iteration 11 complete. Error: -61.22792146892589 Total: 0.5333; Orientation: 0.0394; Line Search: 0.3243
Adding measurement 7746a37 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.660e+04, gradient 2.814e-03, dot -0.416; [5196e8de-c0c5-4786-a5a3-3bffafc84722 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.22792146892589, -10.30496792354594, -6.250567402016683, -2.0678121536318064
LBFGS Accumulation History: 3 points
Removed measurement 7746a37 to history. Total: 3
th(0)=-61.22792146892589;dx=-7.872926236768695E-6
Armijo: th(2333333.333333335)=-54.725789915341835; dx=3.228008789481742E-6 evalInputDelta=-6.502131553584057
New Minimum: -61.22792146892589 > -63.62814960793615
WOLF (strong): th(1166666.6666666674)=-63.62814960793615; dx=3.2391865882142793E-6 evalInputDelta=2.4002281390102596
New Minimum: -63.62814960793615 > -65.54620140239473
END: th(388888.88888888917)=-65.54620140239473; dx=-2.4599220539198314E-6 evalInputDelta=4.318279933468837
Fitness changed from -61.22792146892589 to -65.54620140239473
Iteration 12 complete. Error: -65.54620140239473 Total: 0.8837; Orientation: 0.0502; Line Search: 0.6589
Adding measurement 4a583146 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.645e+04, gradient 1.720e-03, dot -0.634; [5196e8de-c0c5-4786-a5a3-3bffafc84722 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.54620140239473, -10.30496792354594, -6.250567402016683, -2.0678121536318064
LBFGS Accumulation History: 3 points
Removed measurement 4a583146 to history. Total: 3
th(0)=-65.54620140239473;dx=-2.948937050584547E-6
New Minimum: -65.54620140239473 > -69.65396042428723
END: th(837835.7127901777)=-69.65396042428723; dx=-1.6617151962102676E-6 evalInputDelta=4.107759021892505
Fitness changed from -65.54620140239473 to -69.65396042428723
Iteration 13 complete. Error: -69.65396042428723 Total: 0.5234; Orientation: 0.0429; Line Search: 0.3198
Adding measurement 5638c388 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.380e+04, gradient 1.774e-03, dot -0.564; [5196e8de-c0c5-4786-a5a3-3bffafc84722 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.65396042428723, -10.30496792354594, -6.250567402016683, -2.0678121536318064
LBFGS Accumulation History: 3 points
Removed measurement 5638c388 to history. Total: 3
th(0)=-69.65396042428723;dx=-3.1224771650424823E-6
New Minimum: -69.65396042428723 > -73.7303010837979
WOLF (strong): th(1805062.3241827488)=-73.7303010837979; dx=1.8595955725492668E-7 evalInputDelta=4.076340659510663
END: th(902531.1620913744)=-73.15156743234851; dx=-7.162820463774509E-7 evalInputDelta=3.49760700806128
Fitness changed from -69.65396042428723 to -73.7303010837979
Iteration 14 complete. Error: -73.7303010837979 Total: 0.6644; Orientation: 0.0412; Line Search: 0.4681
Adding measurement 553b9eca to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.657e+04, gradient 2.569e-03, dot -0.314; [5196e8de-c0c5-4786-a5a3-3bffafc84722 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.7303010837979, -10.30496792354594, -6.250567402016683, -2.0678121536318064
LBFGS Accumulation History: 3 points
Removed measurement 553b9eca to history. Total: 3
th(0)=-73.7303010837979;dx=-6.572706978659817E-6
Armijo: th(1944444.4444444461)=-72.7360521739217; dx=3.883788151346262E-6 evalInputDelta=-0.9942489098761911
New Minimum: -73.7303010837979 > -79.34809110643612
WOLF (strong): th(972222.2222222231)=-79.34809110643612; dx=1.4394939032748621E-6 evalInputDelta=5.617790022638218
END: th(324074.07407407433)=-77.55743244532682; dx=-4.137608855057607E-6 evalInputDelta=3.8271313615289273
Fitness changed from -73.7303010837979 to -79.34809110643612
Iteration 15 complete. Error: -79.34809110643612 Total: 0.8329; Orientation: 0.0428; Line Search: 0.6368
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/4907e313-bc38-4848-bfc2-46d082a04b17.jpg)
Final threshold in iteration 16: -79.34809110643612 (> -Infinity) after 12.004s (< 5400.000s)
Returns
-79.34809110643612