Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

BasicOptimizer.scala:89 executed in 205.13 seconds (1.965 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
Logging
Reset training subject: 7046990112972
Reset training subject: 7048306646579
Adding measurement 16de4f9e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-3.4460184148295316;dx=-4.576371695679866E-4
New Minimum: -3.4460184148295316 > -3.4460359882018676
WOLFE (weak): th(2.154434690031884)=-3.4460359882018676; dx=-4.6728888052700575E-4 evalInputDelta=1.7573372335988324E-5
New Minimum: -3.4460359882018676 > -3.4460542533442777
WOLFE (weak): th(4.308869380063768)=-3.4460542533442777; dx=-4.6691615577957094E-4 evalInputDelta=3.5838514746089345E-5
New Minimum: -3.4460542533442777 > -3.446124545564905
WOLFE (weak): th(12.926608140191302)=-3.446124545564905; dx=-4.648486103631415E-4 evalInputDelta=1.0613073537335538E-4
New Minimum: -3.446124545564905 > -3.446432264708623
WOLFE (weak): th(51.70643256076521)=-3.446432264708623; dx=-4.6081580799624483E-4 evalInputDelta=4.1384987909154347E-4
New Minimum: -3.446432264708623 > -3.44775497810359
WOLFE (weak): th(258.53216280382605)=-3.44775497810359; dx=-4.6329555946182524E-4 evalInputDelta=0.0017365632740582448
New Minimum: -3.44775497810359 > -3.4599937374962377
WOLFE (weak): th(1551.1929768229563)=-3.4599937374962377; dx=-4.3378522768503235E-4 evalInputDelta=0.013975322666706091
New Minimum: -3.4599937374962377 > -3.568333183572461
END: th(10858.350837760694)=-3.568333183572461; dx=-2.8312846285478304E-4 evalInputDelta=0.12231476874292957
Fitness changed from -3.4460184148295316 to -3.568333183572461
Iteration 1 complete. Error: -3.568333183572461 Total: 23.7338; Orientation: 0.0181; Line Search: 9.8697
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/4acb18a3-0654-4528-b895-ff3a7e3969a6.jpg)
Adding measurement 6ccc4f91 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-3.568333183572461;dx=-4.513816558231974E-4
New Minimum: -3.568333183572461 > -4.072056490058499
END: th(23393.607721408407)=-4.072056490058499; dx=-1.5944090468082703E-4 evalInputDelta=0.5037233064860374
Fitness changed from -3.568333183572461 to -4.072056490058499
Iteration 2 complete. Error: -4.072056490058499 Total: 3.9473; Orientation: 0.0170; Line Search: 2.3577
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2df753cf-7dcb-4026-ab6b-fd0f845605a4.jpg)
Adding measurement 2beb7fa6 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-4.072056490058499;dx=-3.9608153871749103E-4
New Minimum: -4.072056490058499 > -4.967069329616784
END: th(50400.00000000001)=-4.967069329616784; dx=-6.747717515609268E-5 evalInputDelta=0.8950128395582855
Fitness changed from -4.072056490058499 to -4.967069329616784
Iteration 3 complete. Error: -4.967069329616784 Total: 3.8144; Orientation: 0.0205; Line Search: 2.4023
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/dcd60f98-52bd-4c4f-bc48-6260014795b0.jpg)
Adding measurement 70d494ac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.506e+03, gradient 1.963e-02, dot -0.231; [2e78120e-34aa-4a53-8f8d-00e5528edf9f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.967069329616784, -4.072056490058499, -3.568333183572461, -3.4460184148295316
LBFGS Accumulation History: 3 points
Removed measurement 70d494ac to history. Total: 3
th(0)=-4.967069329616784;dx=-3.805151481704711E-4
Armijo: th(108583.50837760697)=-4.49075979350368; dx=-2.635088274389183E-5 evalInputDelta=-0.4763095361131038
Armijo: th(54291.75418880348)=-4.947406536374106; dx=-7.876449039800979E-5 evalInputDelta=-0.019662793242678056
Armijo: th(18097.251396267828)=-4.961247952576876; dx=-2.2185751087130796E-4 evalInputDelta=-0.005821377039907816
New Minimum: -4.967069329616784 > -5.00413227985308
END: th(4524.312849066957)=-5.00413227985308; dx=-3.3319781240145213E-4 evalInputDelta=0.03706295023629558
Fitness changed from -4.967069329616784 to -5.00413227985308
Iteration 4 complete. Error: -5.00413227985308 Total: 7.8608; Orientation: 0.4781; Line Search: 5.9772
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/735bdafe-82cb-4667-9741-5e0d4fef787f.jpg)
Adding measurement 66b98f80 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.868e+03, gradient 1.952e-02, dot -0.247; [2e78120e-34aa-4a53-8f8d-00e5528edf9f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.00413227985308, -4.072056490058499, -3.568333183572461, -3.4460184148295316
LBFGS Accumulation History: 3 points
Removed measurement 66b98f80 to history. Total: 3
th(0)=-5.00413227985308;dx=-3.732631063724774E-4
Armijo: th(9747.336550586839)=-4.93774761110238; dx=-2.860040616026767E-4 evalInputDelta=-0.06638466875069948
Armijo: th(4873.668275293419)=-4.99230918676271; dx=-3.262887687437204E-4 evalInputDelta=-0.011823093090369774
New Minimum: -5.00413227985308 > -5.005263038148414
WOLFE (weak): th(1624.5560917644732)=-5.005263038148414; dx=-3.6275955573626515E-4 evalInputDelta=0.0011307582953339335
Armijo: th(3249.1121835289464)=-4.999008080320473; dx=-3.44170660509161E-4 evalInputDelta=-0.005124199532606788
Armijo: th(2436.8341376467097)=-5.002595418604348; dx=-3.5193002923907825E-4 evalInputDelta=-0.0015368612487316469
WOLFE (weak): th(2030.6951147055915)=-5.004295030271496; dx=-3.563466023984262E-4 evalInputDelta=1.62750418416735E-4
Armijo: th(2233.7646261761506)=-5.0035729040387; dx=-3.520458393045822E-4 evalInputDelta=-5.593758143795924E-4
Armijo: th(2132.2298704408713)=-5.003964378382611; dx=-3.546396307717754E-4 evalInputDelta=-1.6790147046830128E-4
WOLFE (weak): th(2081.4624925732314)=-5.004143714481584; dx=-3.546775104873032E-4 evalInputDelta=1.1434628504503053E-5
Armijo: th(2106.8461815070514)=-5.004060812832941; dx=-3.5597066257524537E-4 evalInputDelta=-7.146702013827166E-5
Armijo: th(2094.1543370401414)=-5.004102740275172; dx=-3.548267392066061E-4 evalInputDelta=-2.953957790730044E-5
Armijo: th(2087.8084148066864)=-5.004117795952798; dx=-3.5516242870589876E-4 evalInputDelta=-1.448390028180313E-5
Armijo: th(2084.635453689959)=-5.004131708120968; dx=-3.537431337226622E-4 evalInputDelta=-5.717321114317997E-7
WOLFE (weak): th(2083.048973131595)=-5.0041387594791065; dx=-3.550316048758735E-4 evalInputDelta=6.479626026845153E-6
WOLFE (weak): th(2083.842213410777)=-5.0041376160163; dx=-3.5304511640996665E-4 evalInputDelta=5.336163220626133E-6
WOLFE (weak): th(2084.238833550368)=-5.004133613894418; dx=-3.537296200443538E-4 evalInputDelta=1.334041338729719E-6
WOLFE (weak): th(2084.4371436201636)=-5.004133232739786; dx=-3.5575572246707024E-4 evalInputDelta=9.528867064290125E-7
Armijo: th(2084.5362986550613)=-5.00413304216246; dx=-3.568690559878821E-4 evalInputDelta=7.623093800646075E-7
WOLFE (weak): th(2084.486721137612)=-5.004133613894418; dx=-3.5549298736491325E-4 evalInputDelta=1.334041338729719E-6
WOLFE (weak): th(2084.511509896337)=-5.004133232739786; dx=-3.5380017365461687E-4 evalInputDelta=9.528867064290125E-7
WOLFE (weak): th(2084.5239042756994)=-5.004133613894418; dx=-3.551155203068238E-4 evalInputDelta=1.334041338729719E-6
mu ~= nu (2084.5239042756994): th(1624.5560917644732)=-5.005263038148414
Fitness changed from -5.00413227985308 to -5.005263038148414
Iteration 5 complete. Error: -5.005263038148414 Total: 29.1712; Orientation: 0.4817; Line Search: 27.3070
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/00770c74-b818-405b-907d-bcd5ae514e1c.jpg)
Adding measurement 2518d425 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.947e+03, gradient 1.977e-02, dot -0.248; [2e78120e-34aa-4a53-8f8d-00e5528edf9f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.005263038148414, -4.072056490058499, -3.568333183572461, -3.4460184148295316
LBFGS Accumulation History: 3 points
Removed measurement 2518d425 to history. Total: 3
th(0)=-5.005263038148414;dx=-3.799372527846182E-4
Armijo: th(4490.983963012698)=-4.981894327225988; dx=-3.396948159514844E-4 evalInputDelta=-0.02336871092242543
Armijo: th(2245.491981506349)=-4.995563255223426; dx=-3.57500325658524E-4 evalInputDelta=-0.00969978292498741
Armijo: th(748.497327168783)=-5.00224940246612; dx=-3.77306532774705E-4 evalInputDelta=-0.003013635682293625
Armijo: th(187.12433179219576)=-5.0046247075215

...skipping 4304 bytes...

257898E-4 evalInputDelta=5.716027535740409E-7
Armijo: th(0.05496030569966254)=-5.005263800285578; dx=-3.8613980554111273E-4 evalInputDelta=-3.8106853761377124E-7
Armijo: th(0.05411040406513167)=-5.005263609751297; dx=-3.7798229315206156E-4 evalInputDelta=-5.716028184110655E-7
Armijo: th(0.053685453247866236)=-5.005264181354115; dx=-3.8523594854333323E-4 evalInputDelta=0.0
Armijo: th(0.05347297783923352)=-5.005263609751297; dx=-3.8328937208086827E-4 evalInputDelta=-5.716028184110655E-7
Armijo: th(0.053366740134917164)=-5.005263038148414; dx=-3.827356479765827E-4 evalInputDelta=-1.1432057016591557E-6
Armijo: th(0.05331362128275899)=-5.00526341921701; dx=-3.8415547068111595E-4 evalInputDelta=-7.621371054256088E-7
Armijo: th(0.0532870618566799)=-5.005263609751297; dx=-3.8588585965589517E-4 evalInputDelta=-5.716028184110655E-7
Armijo: th(0.053273782143640355)=-5.005264181354115; dx=-3.8447589122942024E-4 evalInputDelta=0.0
Armijo: th(0.05326714228712058)=-5.005263800285578; dx=-3.837471385187802E-4 evalInputDelta=-3.8106853761377124E-7
Armijo: th(0.053263822358860693)=-5.005264181354115; dx=-3.8378273634710443E-4 evalInputDelta=0.0
WOLFE (weak): th(0.05326216239473075)=-5.005264752956869; dx=-3.8541575215335626E-4 evalInputDelta=5.716027535740409E-7
WOLFE (weak): th(0.05326299237679572)=-5.005264371888374; dx=-3.822630118598323E-4 evalInputDelta=1.905342585928338E-7
Armijo: th(0.05326340736782821)=-5.005264181354115; dx=-3.841157701405209E-4 evalInputDelta=0.0
mu ~= nu (0.05326299237679572): th(0.036262469739983524)=-5.005265324559557
Fitness changed from -5.005264181354115 to -5.005265324559557
Iteration 7 complete. Error: -5.005265324559557 Total: 30.4496; Orientation: 0.4826; Line Search: 28.8495
Adding measurement 1d767329 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.949e+03, gradient 1.983e-02, dot -0.247; [2e78120e-34aa-4a53-8f8d-00e5528edf9f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.005265324559557, -4.072056490058499, -3.568333183572461, -3.4460184148295316
LBFGS Accumulation History: 3 points
Removed measurement 1d767329 to history. Total: 3
th(0)=-5.005265324559557;dx=-3.8439027758815155E-4
Armijo: th(0.11475208550701071)=-5.005261132804997; dx=-3.8615011891777535E-4 evalInputDelta=-4.191754559457195E-6
Armijo: th(0.05737604275350536)=-5.005264181354115; dx=-3.84773031345221E-4 evalInputDelta=-1.1432054414228787E-6
Armijo: th(0.019125347584501785)=-5.005263609751297; dx=-3.8494281915388387E-4 evalInputDelta=-1.7148082598339442E-6
Armijo: th(0.004781336896125446)=-5.005263609751297; dx=-3.875578954822416E-4 evalInputDelta=-1.7148082598339442E-6
Armijo: th(9.562673792250893E-4)=-5.005264943491105; dx=-3.86747561161423E-4 evalInputDelta=-3.8106845146046453E-7
Armijo: th(1.5937789653751487E-4)=-5.005264752956869; dx=-3.8079647132174664E-4 evalInputDelta=-5.716026878488378E-7
Armijo: th(2.2768270933930696E-5)=-5.005264181354115; dx=-3.850298201818384E-4 evalInputDelta=-1.1432054414228787E-6
WOLFE (weak): th(2.846033866741337E-6)=-5.005265324559557; dx=-3.8424990318951236E-4 evalInputDelta=0.0
WOLFE (weak): th(1.2807152400336016E-5)=-5.005265324559557; dx=-3.848001608994958E-4 evalInputDelta=0.0
Armijo: th(1.7787711667133357E-5)=-5.005264943491105; dx=-3.827802622965201E-4 evalInputDelta=-3.8106845146046453E-7
Armijo: th(1.5297432033734687E-5)=-5.005264943491105; dx=-3.8688729477681064E-4 evalInputDelta=-3.8106845146046453E-7
WOLFE (weak): th(1.4052292217035353E-5)=-5.005265324559557; dx=-3.871558297627711E-4 evalInputDelta=0.0
Armijo: th(1.467486212538502E-5)=-5.005264943491105; dx=-3.865348139655458E-4 evalInputDelta=-3.8106845146046453E-7
WOLFE (weak): th(1.4363577171210186E-5)=-5.005265324559557; dx=-3.877651800526324E-4 evalInputDelta=0.0
WOLFE (weak): th(1.4519219648297603E-5)=-5.005265324559557; dx=-3.8267109754965814E-4 evalInputDelta=0.0
Armijo: th(1.4597040886841313E-5)=-5.005264943491105; dx=-3.8333689497696116E-4 evalInputDelta=-3.8106845146046453E-7
Armijo: th(1.4558130267569459E-5)=-5.005264943491105; dx=-3.841468867071847E-4 evalInputDelta=-3.8106845146046453E-7
Armijo: th(1.453867495793353E-5)=-5.005264943491105; dx=-3.7985858805773614E-4 evalInputDelta=-3.8106845146046453E-7
WOLFE (weak): th(1.4528947303115566E-5)=-5.005265324559557; dx=-3.872595220453227E-4 evalInputDelta=0.0
Armijo: th(1.4533811130524548E-5)=-5.005264943491105; dx=-3.8521187874299465E-4 evalInputDelta=-3.8106845146046453E-7
Armijo: th(1.4531379216820057E-5)=-5.005264943491105; dx=-3.869111744085047E-4 evalInputDelta=-3.8106845146046453E-7
Armijo: th(1.4530163259967812E-5)=-5.005264943491105; dx=-3.8344886871473474E-4 evalInputDelta=-3.8106845146046453E-7
Armijo: th(1.4529555281541689E-5)=-5.005264943491105; dx=-3.8706649767683706E-4 evalInputDelta=-3.8106845146046453E-7
Armijo: th(1.4529251292328627E-5)=-5.005264943491105; dx=-3.843396638965876E-4 evalInputDelta=-3.8106845146046453E-7
WOLFE (weak): th(1.4529099297722096E-5)=-5.005265324559557; dx=-3.864085191283913E-4 evalInputDelta=0.0
WOLFE (weak): th(1.4529175295025361E-5)=-5.005265324559557; dx=-3.8686062755230086E-4 evalInputDelta=0.0
mu ~= nu (1.4529175295025361E-5): th(0.0)=-5.005265324559557
Fitness changed from -5.005265324559557 to -5.005265324559557
Static Iteration Total: 34.9928; Orientation: 0.4943; Line Search: 33.3705
Iteration 8 failed. Error: -5.005265324559557
Previous Error: 0.0 -> -5.005265324559557
Retrying iteration 8
Reset training subject: 7223635901990
Adding measurement 6abd212c to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-5.005265324559557;dx=-3.8247073739253174E-4
Armijo: th(3.130224113877012E-5)=-5.005264181354115; dx=-3.813010309930987E-4 evalInputDelta=-1.1432054414228787E-6
Armijo: th(1.565112056938506E-5)=-5.005264371888374; dx=-3.8546306017378333E-4 evalInputDelta=-9.526711828300449E-7
WOLFE (weak): th(5.217040189795019E-6)=-5.005265324559557; dx=-3.839473013499575E-4 evalInputDelta=0.0
WOLFE (weak): th(1.0434080379590039E-5)=-5.005265324559557; dx=-3.838686014101856E-4 evalInputDelta=0.0
WOLFE (weak): th(1.3042600474487548E-5)=-5.005265324559557; dx=-3.845288807721105E-4 evalInputDelta=0.0
Armijo: th(1.4346860521936304E-5)=-5.005264752956869; dx=-3.799693801987986E-4 evalInputDelta=-5.716026878488378E-7
Armijo: th(1.3694730498211927E-5)=-5.005264752956869; dx=-3.836612832231462E-4 evalInputDelta=-5.716026878488378E-7
Armijo: th(1.3368665486349737E-5)=-5.005264752956869; dx=-3.824637310367269E-4 evalInputDelta=-5.716026878488378E-7
WOLFE (weak): th(1.3205632980418643E-5)=-5.005265324559557; dx=-3.8189685974381683E-4 evalInputDelta=0.0
Armijo: th(1.328714923338419E-5)=-5.005264752956869; dx=-3.8430811238196775E-4 evalInputDelta=-5.716026878488378E-7
WOLFE (weak): th(1.3246391106901417E-5)=-5.005265324559557; dx=-3.7724021250419126E-4 evalInputDelta=0.0
WOLFE (weak): th(1.3266770170142804E-5)=-5.005265324559557; dx=-3.836002116665057E-4 evalInputDelta=0.0
Armijo: th(1.3276959701763496E-5)=-5.005264752956869; dx=-3.831280122754456E-4 evalInputDelta=-5.716026878488378E-7
Armijo: th(1.327186493595315E-5)=-5.005264752956869; dx=-3.8272288929576523E-4 evalInputDelta=-5.716026878488378E-7
WOLFE (weak): th(1.3269317553047977E-5)=-5.005265324559557; dx=-3.85441786884115E-4 evalInputDelta=0.0
WOLFE (weak): th(1.3270591244500563E-5)=-5.005265324559557; dx=-3.8327249521249686E-4 evalInputDelta=0.0
Armijo: th(1.3271228090226857E-5)=-5.005264752956869; dx=-3.842311227270035E-4 evalInputDelta=-5.716026878488378E-7
WOLFE (weak): th(1.327090966736371E-5)=-5.005265324559557; dx=-3.836766835175773E-4 evalInputDelta=0.0
WOLFE (weak): th(1.3271068878795283E-5)=-5.005265324559557; dx=-3.8378052351230806E-4 evalInputDelta=0.0
WOLFE (weak): th(1.327114848451107E-5)=-5.005265324559557; dx=-3.848505081781174E-4 evalInputDelta=0.0
mu ~= nu (1.327114848451107E-5): th(0.0)=-5.005265324559557
Fitness changed from -5.005265324559557 to -5.005265324559557
Static Iteration Total: 28.4800; Orientation: 0.0238; Line Search: 26.0882
Iteration 9 failed. Error: -5.005265324559557
Previous Error: 0.0 -> -5.005265324559557
Optimization terminated 9
Final threshold in iteration 9: -5.005265324559557 (> -Infinity) after 205.126s (< 3600.000s)

Returns

    -5.005265324559557