BasicOptimizer.scala:89 executed in 199.12 seconds (2.457 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: 5897452928786
Reset training subject: 5899008626298
Adding measurement 82aab11 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.05459027716681268;dx=-1.9597728181070088E-6
New Minimum: -0.05459027716681268 > -0.054590748453576615
WOLFE (weak): th(2.154434690031884)=-0.054590748453576615; dx=-1.963307995397676E-6 evalInputDelta=4.712867639339313E-7
New Minimum: -0.054590748453576615 > -0.054591238928693664
WOLFE (weak): th(4.308869380063768)=-0.054591238928693664; dx=-1.9642727698045134E-6 evalInputDelta=9.617618809826256E-7
New Minimum: -0.054591238928693664 > -0.054591821095613176
WOLFE (weak): th(12.926608140191302)=-0.054591821095613176; dx=-1.9616328075313727E-6 evalInputDelta=1.5439288004945317E-6
New Minimum: -0.054591821095613176 > -0.05459383410846911
WOLFE (weak): th(51.70643256076521)=-0.05459383410846911; dx=-1.9611165421802302E-6 evalInputDelta=3.5569416564282252E-6
New Minimum: -0.05459383410846911 > -0.054606490505834326
WOLFE (weak): th(258.53216280382605)=-0.054606490505834326; dx=-1.958186291819869E-6 evalInputDelta=1.6213339021645123E-5
New Minimum: -0.054606490505834326 > -0.054688228023315306
WOLFE (weak): th(1551.1929768229563)=-0.054688228023315306; dx=-2.0118295309555E-6 evalInputDelta=9.79508565026252E-5
New Minimum: -0.054688228023315306 > -0.055169799362269685
WOLFE (weak): th(10858.350837760694)=-0.055169799362269685; dx=-1.876481061019178E-6 evalInputDelta=5.795221954570037E-4
Armijo: th(86866.80670208555)=-0.0544356310709193; dx=-1.487810635032632E-6 evalInputDelta=-1.546460958933779E-4
New Minimum: -0.055169799362269685 > -0.05595849619440744
END: th(48862.57876992312)=-0.05595849619440744; dx=-1.6479130162437508E-6 evalInputDelta=0.0013682190275947567
Fitness changed from -0.05459027716681268 to -0.05595849619440744
Iteration 1 complete. Error: -0.05595849619440744 Total: 18.6642; Orientation: 0.0165; Line Search: 14.1842
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/96457f1d-5d41-482a-9399-dbdb8ae7fd2d.jpg)
Adding measurement 3d4260f7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.05595849619440744;dx=-1.91112414790714E-6
Armijo: th(105271.23474633782)=-0.05269923407990064; dx=-1.3552951970856607E-6 evalInputDelta=-0.0032592621145067988
Armijo: th(52635.61737316891)=-0.05436544231226333; dx=-1.6207073553810548E-6 evalInputDelta=-0.0015930538821441048
New Minimum: -0.05595849619440744 > -0.0559773642029356
WOLFE (weak): th(17545.205791056305)=-0.0559773642029356; dx=-1.8638144488151038E-6 evalInputDelta=1.886800852816256E-5
Armijo: th(35090.41158211261)=-0.05504508701623594; dx=-1.751649240853817E-6 evalInputDelta=-9.134091781714954E-4
Armijo: th(26317.80868658446)=-0.055573948899665895; dx=-1.7713042459861902E-6 evalInputDelta=-3.8454729474154264E-4
Armijo: th(21931.507238820384)=-0.05583800985988133; dx=-1.803078037660812E-6 evalInputDelta=-1.2048633452611118E-4
Armijo: th(19738.356514938343)=-0.055925404097280584; dx=-1.845435055853361E-6 evalInputDelta=-3.3092097126853626E-5
Armijo: th(18641.781152997326)=-0.05595516955689; dx=-1.8600408883956763E-6 evalInputDelta=-3.326637517439557E-6
WOLFE (weak): th(18093.493472026814)=-0.05596602044792544; dx=-1.8669796064801205E-6 evalInputDelta=7.524253518000068E-6
WOLFE (weak): th(18367.63731251207)=-0.05596089482908261; dx=-1.862567345414343E-6 evalInputDelta=2.398634675174205E-6
Armijo: th(18504.7092327547)=-0.05595812588431587; dx=-1.8586648656486117E-6 evalInputDelta=-3.7031009157001415E-7
WOLFE (weak): th(18436.173272633387)=-0.05595976105534095; dx=-1.8610904835037537E-6 evalInputDelta=1.2648609335128014E-6
WOLFE (weak): th(18470.441252694043)=-0.05595862101748158; dx=-1.864902657669903E-6 evalInputDelta=1.2482307414074523E-7
WOLFE (weak): th(18487.57524272437)=-0.05595886442167531; dx=-1.8601486661750427E-6 evalInputDelta=3.6822726787177906E-7
WOLFE (weak): th(18496.142237739536)=-0.05595866678587234; dx=-1.8588791141684024E-6 evalInputDelta=1.7059146489861732E-7
Armijo: th(18500.425735247118)=-0.05595851283750008; dx=-1.858169688105435E-6 evalInputDelta=1.6643092640156176E-8
Armijo: th(18498.283986493327)=-0.0559584171396498; dx=-1.8579056139637803E-6 evalInputDelta=-7.90547576359768E-8
Armijo: th(18497.21311211643)=-0.05595814876871841; dx=-1.8600090224572132E-6 evalInputDelta=-3.474256890304006E-7
Armijo: th(18496.67767492798)=-0.05595821118067778; dx=-1.8574161708979466E-6 evalInputDelta=-2.85013729658945E-7
Armijo: th(18496.40995633376)=-0.05595835472792015; dx=-1.859817315140396E-6 evalInputDelta=-1.4146648728841082E-7
Armijo: th(18496.276097036647)=-0.05595823406504544; dx=-1.8585760819431736E-6 evalInputDelta=-2.621293620011511E-7
mu ~= nu (18496.142237739536): th(17545.205791056305)=-0.0559773642029356
Fitness changed from -0.05595849619440744 to -0.0559773642029356
Iteration 2 complete. Error: -0.0559773642029356 Total: 32.5002; Orientation: 0.0191; Line Search: 30.8031
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/396883de-5a15-4296-a43d-a433fae5fcf7.jpg)
Adding measurement 2ccd5f14 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.0559773642029356;dx=-2.0306587970114166E-6
Armijo: th(39848.874664306655)=-0.05417304223087414; dx=-1.6933989720832475E-6 evalInputDelta=-0.0018043219720614637
Armijo: th(19924.437332153328)=-0.05478401480384921; dx=-1.9044167636911641E-6 evalInputDelta=-0.0011933493990863922
Armijo: th(6641.479110717776)=-0.055638311519855876; dx=-1.973736286714249E-6 evalInputDelta=-3.3905268307972414E-4
Armijo: th(1660.369777679444)=-0.055933960973814374; dx=-2.0241653675172215E-6 evalInputDelta=-4.340322912122635E-5
Armijo: th(332.0739555358888)=-0.05597015138835971; dx=-2.0390093544039493E-6 evalInputDelta=-7.212814575892346E-6
Armijo: th(55.34565925598147)=-0.05597605398563384; dx=-2.033319779806396E-6 evalInputDelta=-1.3102173017573437E-6
Armijo: th(7.906522750854495)=-0.05597725813886627; dx=-2.0298880044463507E-6 evalInputDelta=-1.0606406933288959E-7
New Minimum: -0.0559773642029356 > -0.055977466107440366
WOLFE (weak): th(0.9883153438568119)=-0.055977466107440366; dx=-2.030542982289486E-6 evalInputDelta=1.019045047651046E-7
Armijo: th(4.447419047355654)=-0.05597732468889404; dx=-2.0304011478338634E-6 evalInputDelta=-3.951404155960736E-8
Armijo: th(2.7178671956062326)=-0.05597718119029802; dx=-2.030615495669568E-6 evalInputDelta=-1.8301263757930508E-7
Armijo: th(1.8530912697315223)=-0.055976894192002385; dx=-2.0329302541202866E-6 evalInputDelta=-4.7001093321508147E-7
Armijo: th(1.420703306794167)=-0.05597724566072725; dx=-2.0303386126125964E-6 evalInputDelta=-1.1854220834800477E-7
Armijo: th(1.2045093253254895)=-0.05597724566072725; dx=-2.035086074339703E-6 evalInputDelta=-1.1854220834800477E-7
New Minimum: -0.055977466107440366 > -0.0559775326572209
WOLFE (weak): th(1.0964123345911507)=-0.0559775326572209; dx=-2.029508589366101E-6 evalInputDelta=1.6845428529865814E-7
Armijo: th(1.15046082995832)=-0.05597735796387826; dx=-2.0303389247138506E-6 evalInputDelta=-6.2390573402071325E-9
Armijo: th(1.1234365822747354)=-0.05597721862474984; dx=-2.033031986427056E-6 evalInputDelta=-1.4557818576316217E-7
Armijo: th(1.109924458432943)=-0.05597731013108223; dx=-2.0298314654667174E-6 evalInputDelta=-5.407185336980813E-8
WOLFE (weak): th(1.103168396512047)=-0.055977409956001506; dx=-2.0316485334445216E-6 evalInputDelta=4.575306590537398E-8
Armijo: th(1.106546427472495)=-0.055977262298245324; dx=-2.0293681581732283E-6 evalInputDelta=-1.0190469027643312E-7
Armijo: th(1.104857411992271)=-0.05597724774041728; dx=-2.029834695500434E-6 evalInputDelta=-1.1646251832364563E-7
Armijo: th(1.104012904252159)=-0.05597723110289488; dx=-2.029623186744215E-6 evalInputDelta=-1.3310004071814818E-7
Armijo: th(1.103590650382103)=-0.055977235262275944; dx=-2.0319888072685598E-6 evalInputDelta=-1.2894065965635138E-7
Armijo: th(1.103379523447075)=-0.05597724774041728; dx=-2.031647380245696E-6 evalInputDelta=-1.1646251832364563E-7
Armijo: th(1.103273959979561)=-0.0559772394216567; dx=-2.031147891178395E-6 evalInputDelta=-1.247812788998659E-7
Armijo: th(1.103221178245804)=-0.05597728101544724; dx=-2.0328141
...skipping 2364 bytes...
85; dx=-2.0277572281915135E-6 evalInputDelta=-3.6394507904602413E-7
Armijo: th(2.381381868185332)=-0.055977164552755844; dx=-2.0335378740019423E-6 evalInputDelta=-3.681044650552523E-7
Armijo: th(2.3790608332260867)=-0.05597724982010723; dx=-2.0300843587570726E-6 evalInputDelta=-2.8283711366733355E-7
Armijo: th(2.377900315746464)=-0.055977285174824594; dx=-2.032880924731272E-6 evalInputDelta=-2.4748239630528746E-7
Armijo: th(2.377320057006653)=-0.05597746194807646; dx=-2.0308123004422302E-6 evalInputDelta=-7.070914444240461E-8
Armijo: th(2.3770299276367473)=-0.05597743907156943; dx=-2.0302083558091604E-6 evalInputDelta=-9.358565147138398E-8
Armijo: th(2.3768848629517945)=-0.05597730805139452; dx=-2.030427309485145E-6 evalInputDelta=-2.2460582638217375E-7
Armijo: th(2.376812330609318)=-0.05597746194807646; dx=-2.0298939786558557E-6 evalInputDelta=-7.070914444240461E-8
Armijo: th(2.3767760644380798)=-0.05597746194807646; dx=-2.031503621877439E-6 evalInputDelta=-7.070914444240461E-8
WOLFE (weak): th(2.3767579313524605)=-0.0559775576133682; dx=-2.029473731593266E-6 evalInputDelta=2.4956147301469223E-8
mu ~= nu (2.3767579313524605): th(2.3767397982668417)=-0.0559775576133682
Fitness changed from -0.0559775326572209 to -0.0559775576133682
Iteration 4 complete. Error: -0.0559775576133682 Total: 30.5397; Orientation: 0.5063; Line Search: 28.4539
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/24e58472-ccb5-4d83-b56f-873a2c19636a.jpg)
Adding measurement 13c900b0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.777e+06, gradient 1.466e-03, dot -0.908; [11111ddb-f327-44ba-91fd-a4ca532f2181 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.0559775576133682, -0.0559773642029356, -0.05595849619440744, -0.05459027716681268
LBFGS Accumulation History: 3 points
Removed measurement 13c900b0 to history. Total: 3
th(0)=-0.0559775576133682;dx=-2.039785455204673E-6
Armijo: th(5.120589270388508)=-0.055977170791834736; dx=-2.0308858584498233E-6 evalInputDelta=-3.868215334643099E-7
Armijo: th(2.560294635194254)=-0.055977407876317505; dx=-2.030030768731277E-6 evalInputDelta=-1.4973705069615262E-7
Armijo: th(0.8534315450647513)=-0.05597727893575845; dx=-2.0323390951329207E-6 evalInputDelta=-2.786776097524202E-7
Armijo: th(0.21335788626618782)=-0.05597739955758072; dx=-2.0323340463997513E-6 evalInputDelta=-1.580557874789057E-7
Armijo: th(0.042671577253237565)=-0.05597728933420164; dx=-2.0323768466106873E-6 evalInputDelta=-2.6827916656257944E-7
Armijo: th(0.007111929542206261)=-0.0559771562339829; dx=-2.0314212043102673E-6 evalInputDelta=-4.0137938529805073E-7
Armijo: th(0.0010159899346008944)=-0.05597746194807646; dx=-2.0284666244968947E-6 evalInputDelta=-9.566529174387384E-8
Armijo: th(1.269987418251118E-4)=-0.05597730805139452; dx=-2.031795405142471E-6 evalInputDelta=-2.4956197368364297E-7
WOLFE (weak): th(1.4110971313901311E-5)=-0.0559775576133682; dx=-2.029836627275585E-6 evalInputDelta=0.0
Armijo: th(7.055485656950656E-5)=-0.05597746194807646; dx=-2.0451992919773163E-6 evalInputDelta=-9.566529174387384E-8
Armijo: th(4.2332913941703934E-5)=-0.05597746194807646; dx=-2.0318921480459866E-6 evalInputDelta=-9.566529174387384E-8
WOLFE (weak): th(2.8221942627802623E-5)=-0.0559775576133682; dx=-2.0297904139062874E-6 evalInputDelta=0.0
Armijo: th(3.527742828475328E-5)=-0.05597746194807646; dx=-2.040895625946528E-6 evalInputDelta=-9.566529174387384E-8
WOLFE (weak): th(3.174968545627795E-5)=-0.0559775576133682; dx=-2.029653909471306E-6 evalInputDelta=0.0
WOLFE (weak): th(3.351355687051562E-5)=-0.0559775576133682; dx=-2.0265043576019097E-6 evalInputDelta=0.0
WOLFE (weak): th(3.439549257763445E-5)=-0.0559775576133682; dx=-2.043373632610403E-6 evalInputDelta=0.0
Armijo: th(3.4836460431193867E-5)=-0.05597746194807646; dx=-2.0385419314408686E-6 evalInputDelta=-9.566529174387384E-8
Armijo: th(3.461597650441416E-5)=-0.05597746194807646; dx=-2.032025516991713E-6 evalInputDelta=-9.566529174387384E-8
WOLFE (weak): th(3.45057345410243E-5)=-0.0559775576133682; dx=-2.032493643256106E-6 evalInputDelta=0.0
WOLFE (weak): th(3.456085552271923E-5)=-0.0559775576133682; dx=-2.029784227735693E-6 evalInputDelta=0.0
WOLFE (weak): th(3.4588416013566696E-5)=-0.0559775576133682; dx=-2.038890257222477E-6 evalInputDelta=0.0
Armijo: th(3.460219625899043E-5)=-0.05597746194807646; dx=-2.032512184337366E-6 evalInputDelta=-9.566529174387384E-8
WOLFE (weak): th(3.459530613627856E-5)=-0.0559775576133682; dx=-2.0959897051236746E-6 evalInputDelta=0.0
Armijo: th(3.4598751197634495E-5)=-0.05597746194807646; dx=-2.038968264742114E-6 evalInputDelta=-9.566529174387384E-8
Armijo: th(3.4597028666956525E-5)=-0.05597746194807646; dx=-2.0310255287373396E-6 evalInputDelta=-9.566529174387384E-8
WOLFE (weak): th(3.4596167401617544E-5)=-0.0559775576133682; dx=-2.040127724254387E-6 evalInputDelta=0.0
WOLFE (weak): th(3.4596598034287034E-5)=-0.0559775576133682; dx=-2.0277106418610073E-6 evalInputDelta=0.0
Armijo: th(3.4596813350621776E-5)=-0.05597746194807646; dx=-2.0331609706848117E-6 evalInputDelta=-9.566529174387384E-8
mu ~= nu (3.4596598034287034E-5): th(0.0)=-0.0559775576133682
Fitness changed from -0.0559775576133682 to -0.0559775576133682
Static Iteration Total: 43.0212; Orientation: 0.4825; Line Search: 40.9659
Iteration 5 failed. Error: -0.0559775576133682
Previous Error: 0.0 -> -0.0559775576133682
Retrying iteration 5
Reset training subject: 6064381692196
Adding measurement 25d95134 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-0.0559775576133682;dx=-2.029154129609628E-6
Armijo: th(7.453634290464731E-5)=-0.05597746194807646; dx=-2.030711366941348E-6 evalInputDelta=-9.566529174387384E-8
Armijo: th(3.7268171452323655E-5)=-0.05597746194807646; dx=-2.0299580815156905E-6 evalInputDelta=-9.566529174387384E-8
WOLFE (weak): th(1.2422723817441218E-5)=-0.0559775576133682; dx=-2.0357840519918594E-6 evalInputDelta=0.0
WOLFE (weak): th(2.4845447634882435E-5)=-0.0559775576133682; dx=-2.030833897553606E-6 evalInputDelta=0.0
WOLFE (weak): th(3.105680954360305E-5)=-0.0559775576133682; dx=-2.0300480376426804E-6 evalInputDelta=0.0
WOLFE (weak): th(3.416249049796335E-5)=-0.0559775576133682; dx=-2.05039225236773E-6 evalInputDelta=0.0
Armijo: th(3.57153309751435E-5)=-0.05597746194807646; dx=-2.0315593452106096E-6 evalInputDelta=-9.566529174387384E-8
Armijo: th(3.493891073655342E-5)=-0.05597746194807646; dx=-2.041667997250123E-6 evalInputDelta=-9.566529174387384E-8
WOLFE (weak): th(3.455070061725838E-5)=-0.0559775576133682; dx=-2.029843520596466E-6 evalInputDelta=0.0
Armijo: th(3.4744805676905906E-5)=-0.05597746194807646; dx=-2.0375818344661643E-6 evalInputDelta=-9.566529174387384E-8
Armijo: th(3.4647753147082144E-5)=-0.05597746194807646; dx=-2.0413158887401716E-6 evalInputDelta=-9.566529174387384E-8
Armijo: th(3.459922688217026E-5)=-0.05597746194807646; dx=-2.028603376825507E-6 evalInputDelta=-9.566529174387384E-8
WOLFE (weak): th(3.457496374971432E-5)=-0.0559775576133682; dx=-2.031213310796823E-6 evalInputDelta=0.0
WOLFE (weak): th(3.458709531594229E-5)=-0.0559775576133682; dx=-2.0327403355800286E-6 evalInputDelta=0.0
WOLFE (weak): th(3.459316109905628E-5)=-0.0559775576133682; dx=-2.032647385830274E-6 evalInputDelta=0.0
WOLFE (weak): th(3.459619399061327E-5)=-0.0559775576133682; dx=-2.030649506476537E-6 evalInputDelta=0.0
WOLFE (weak): th(3.459771043639177E-5)=-0.0559775576133682; dx=-2.0317489358300285E-6 evalInputDelta=0.0
Armijo: th(3.459846865928102E-5)=-0.05597746194807646; dx=-2.0316156508368545E-6 evalInputDelta=-9.566529174387384E-8
Armijo: th(3.4598089547836394E-5)=-0.05597746194807646; dx=-2.0319972188335626E-6 evalInputDelta=-9.566529174387384E-8
WOLFE (weak): th(3.4597899992114086E-5)=-0.0559775576133682; dx=-2.0306937373276738E-6 evalInputDelta=0.0
mu ~= nu (3.4597899992114086E-5): th(0.0)=-0.0559775576133682
Fitness changed from -0.0559775576133682 to -0.0559775576133682
Static Iteration Total: 32.1913; Orientation: 0.0187; Line Search: 29.6370
Iteration 6 failed. Error: -0.0559775576133682
Previous Error: 0.0 -> -0.0559775576133682
Optimization terminated 6
Final threshold in iteration 6: -0.0559775576133682 (> -Infinity) after 199.120s (< 3600.000s)
Returns
-0.0559775576133682