Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

Iteration 20 Iteration 20

Iteration 25 Iteration 25

Iteration 30 Iteration 30

BasicOptimizer.scala:89 executed in 279.30 seconds (3.791 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: 3879686431224
Reset training subject: 3880826644198
Adding measurement 18e3b268 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1.3791982484689953;dx=-1.2118397247442772E-4
New Minimum: -1.3791982484689953 > -1.3795567563875082
WOLFE (weak): th(2.154434690031884)=-1.3795567563875082; dx=-1.2061065035819275E-4 evalInputDelta=3.5850791851288477E-4
New Minimum: -1.3795567563875082 > -1.3799142883161983
WOLFE (weak): th(4.308869380063768)=-1.3799142883161983; dx=-1.2117677578492208E-4 evalInputDelta=7.160398472030316E-4
New Minimum: -1.3799142883161983 > -1.3813405734625759
WOLFE (weak): th(12.926608140191302)=-1.3813405734625759; dx=-1.2146565268982381E-4 evalInputDelta=0.00214232499358058
New Minimum: -1.3813405734625759 > -1.3877664780713863
WOLFE (weak): th(51.70643256076521)=-1.3877664780713863; dx=-1.2225506165078055E-4 evalInputDelta=0.008568229602391009
New Minimum: -1.3877664780713863 > -1.422842547870641
WOLFE (weak): th(258.53216280382605)=-1.422842547870641; dx=-1.2095223769537729E-4 evalInputDelta=0.043644299401645714
New Minimum: -1.422842547870641 > -1.657657603257059
WOLFE (weak): th(1551.1929768229563)=-1.657657603257059; dx=-1.3070738583663972E-4 evalInputDelta=0.2784593547880636
New Minimum: -1.657657603257059 > -2.7281603068773252
END: th(10858.350837760694)=-2.7281603068773252; dx=-6.392124458940362E-5 evalInputDelta=1.34896205840833
Fitness changed from -1.3791982484689953 to -2.7281603068773252
Iteration 1 complete. Error: -2.7281603068773252 Total: 13.6580; Orientation: 0.0199; Line Search: 10.3004
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/520fca87-8ff0-429a-983c-f365d638bdeb.jpg)
Adding measurement 3f0e2824 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-2.7281603068773252;dx=-3.387296629180122E-4
New Minimum: -2.7281603068773252 > -3.360498634274103
WOLF (strong): th(23393.607721408407)=-3.360498634274103; dx=5.775320043210501E-5 evalInputDelta=0.6323383273967775
New Minimum: -3.360498634274103 > -4.367547759029585
END: th(11696.803860704204)=-4.367547759029585; dx=-1.2474798077510298E-5 evalInputDelta=1.6393874521522598
Fitness changed from -2.7281603068773252 to -4.367547759029585
Iteration 2 complete. Error: -4.367547759029585 Total: 4.6125; Orientation: 0.0222; Line Search: 3.4177
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/bf1acaef-32dc-4be9-a945-1ff571a3f974.jpg)
Adding measurement 39f8c86e to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-4.367547759029585;dx=-8.086694322730124E-4
Armijo: th(25200.000000000004)=-3.488381012499017; dx=8.324493858543929E-5 evalInputDelta=-0.8791667465305681
New Minimum: -4.367547759029585 > -5.773987241141212
WOLF (strong): th(12600.000000000002)=-5.773987241141212; dx=8.930082450829289E-5 evalInputDelta=1.4064394821116268
New Minimum: -5.773987241141212 > -6.340915399528619
END: th(4200.000000000001)=-6.340915399528619; dx=-1.995800191492141E-4 evalInputDelta=1.973367640499034
Fitness changed from -4.367547759029585 to -6.340915399528619
Iteration 3 complete. Error: -6.340915399528619 Total: 5.7313; Orientation: 0.0199; Line Search: 4.5902
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/edc734f6-1819-4641-a039-d1b057924ff0.jpg)
Adding measurement 2428a163 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.214e+03, gradient 2.606e-02, dot -0.254; [1e3b78e3-fb1f-47c5-8286-970073a51bc7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.340915399528619, -4.367547759029585, -2.7281603068773252, -1.3791982484689953
LBFGS Accumulation History: 3 points
Removed measurement 2428a163 to history. Total: 3
th(0)=-6.340915399528619;dx=-6.761669205514985E-4
New Minimum: -6.340915399528619 > -7.2847804996246985
WOLF (strong): th(9048.625698133914)=-7.2847804996246985; dx=8.754266091742084E-5 evalInputDelta=0.9438651000960796
New Minimum: -7.2847804996246985 > -7.931504727228126
END: th(4524.312849066957)=-7.931504727228126; dx=-8.02426561110774E-5 evalInputDelta=1.5905893276995071
Fitness changed from -6.340915399528619 to -7.931504727228126
Iteration 4 complete. Error: -7.931504727228126 Total: 5.0494; Orientation: 0.4772; Line Search: 3.4503
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/3677d51a-ad4b-49f3-bb36-c37a5df06463.jpg)
Adding measurement 1c27daac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.050e+03, gradient 3.121e-02, dot -0.169; [1e3b78e3-fb1f-47c5-8286-970073a51bc7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.931504727228126, -4.367547759029585, -2.7281603068773252, -1.3791982484689953
LBFGS Accumulation History: 3 points
Removed measurement 1c27daac to history. Total: 3
th(0)=-7.931504727228126;dx=-9.711052578018078E-4
New Minimum: -7.931504727228126 > -9.12122926589332
WOLF (strong): th(9747.336550586839)=-9.12122926589332; dx=1.3556966375243863E-4 evalInputDelta=1.1897245386651933
New Minimum: -9.12122926589332 > -9.575828773384416
WOLF (strong): th(4873.668275293419)=-9.575828773384416; dx=8.122136586137795E-6 evalInputDelta=1.6443240461562896
END: th(1624.5560917644732)=-9.15971338953828; dx=-4.049880978361722E-4 evalInputDelta=1.2282086623101547
Fitness changed from -7.931504727228126 to -9.575828773384416
Iteration 5 complete. Error: -9.575828773384416 Total: 6.1782; Orientation: 0.4875; Line Search: 4.5593
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/2ab8ac66-dc3a-4ef9-9dc3-1024e4ce9fab.jpg)
Adding measurement 755034c4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.274e+03, gradient 3.836e-02, dot -0.212; [1e3b78e3-fb1f-47c5-8286-970073a51bc7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.575828773384416, -4.367547759029585, -2.7281603068773252, -1.3791982484689953
LBFGS Accumulation History: 3 points
Removed measurement 755034c4 to history. Total: 3
th(0)=-9.575828773384416;dx=-0.0014669724660089818
New Minimum: -9.575828773384416 > -11.008553220742568
WOLF (strong): th(3500.0000000000014)=-11.008553220742568; dx=7.410848122207157E-5 evalInputDelta=1.4327244473581526
New Minimum: -11.008553220742568 > -11.278688975109356
END: th(1750.0000000000007)=-11.278688975109356; dx=-3.26926737698796E-4 evalInputDelta=1.7028602017249401
Fitness changed from -9.575828773384416 to -11.278688975109356
Iteration 6 complete. Error: -11.278688975109356 Total: 5.1587; Orientation: 0.6072; Line Search: 3.4394
Adding measurement 18721018 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.716e+03, gradient 3.417e-02, dot -0.168; [1e3b78e3-fb1f-47c5-8286-970073a51bc7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -11.278688975109356, -4.367547759029585, -2.7281603068773252, -1.3791982484689953
LBFGS Accumulation History: 3 points
Removed measurement 18721018 to history. Total: 3
th(0)=-11.278688975109356;dx=-0.0011635795470404746
New Minimum: -11.278688975109356 > -12.584837880493264
WOLF (strong): th(3770.260707555798)=-12.584837880493264; dx=1.471358452873525E-4 evalInputDelta=1.3061489053839086
New Minimum: -12.584837880493264 > -12.7606392264207
END: th(1885.130353777899)=-12.7606392264207; dx=-3.6472174789225706E-4 evalInputDelta=1.4819502513113445
Fitness changed from -11.278688975109356 to -12.7606392264207
Iteration 7 complete. Error: -12.7606392264207 Total: 5.0208; Orientation: 0.4705; Line Search: 3.4529
Adding measurement 44633cf4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.886e+04, gradient 3.808e-02, dot -0.198; [1e3b78e3-fb1f-47c5-8286-970073a51bc7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.7606392264207, -4.367547759029585, -2.7281603068773252, -1.3791982484689953
LBFGS Accumulation History: 3 points
Removed measurement 44633cf4 to history. Total: 3
th(0)=-12.7606392264207;dx=-0.0014467153605266629
New Minimum: -12.7606392264207 > -13.869505237608237
WOLF (strong): th(4061.3902294111836)=-13.869505237608237; dx=2.8379210629680713E-4 evalInputDelta=1.108866011187537
New Minimum: -13.869505237608237 > -14.14557005297155
END: th(2030.6951147055918)=-14.14557005297155; dx=

...skipping 26102 bytes...

5 evalInputDelta=2.4233999674549977E-4
New Minimum: -43.1615838243034 > -43.16204626749406
WOLFE (weak): th(0.14055797064518108)=-43.16204626749406; dx=-0.005940779332601508 evalInputDelta=7.047831874089638E-4
New Minimum: -43.16204626749406 > -43.16415165535425
WOLFE (weak): th(0.5622318825807243)=-43.16415165535425; dx=-0.005939237308155473 evalInputDelta=0.002810171047599397
New Minimum: -43.16415165535425 > -43.17530827473703
WOLFE (weak): th(2.8111594129036215)=-43.17530827473703; dx=-0.0059463621260942776 evalInputDelta=0.013966790430373521
New Minimum: -43.17530827473703 > -43.24498358520918
WOLFE (weak): th(16.86695647742173)=-43.24498358520918; dx=-0.00591917138089758 evalInputDelta=0.083642100902523
New Minimum: -43.24498358520918 > -43.720657084484124
WOLFE (weak): th(118.06869534195212)=-43.720657084484124; dx=-0.005547706060970511 evalInputDelta=0.5593156001774702
New Minimum: -43.720657084484124 > -46.397373608865664
END: th(944.549562735617)=-46.397373608865664; dx=-0.003566576988967157 evalInputDelta=3.23603212455901
Fitness changed from -43.161341484306654 to -46.397373608865664
Iteration 32 complete. Error: -46.397373608865664 Total: 27.2345; Orientation: 15.0744; Line Search: 11.0768
Adding measurement 683144c9 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.912e+04, gradient 7.670e-02, dot 0.491; [1e3b78e3-fb1f-47c5-8286-970073a51bc7 = 1.000/1.000e+00]
th(0)=-46.397373608865664;dx=-720.328160413077
Armijo: th(2034.9703444120603)=-23.432247242495475; dx=-0.0030169515710869363 evalInputDelta=-22.96512636637019
Armijo: th(1017.4851722060301)=-23.33204224723312; dx=-0.006076712457835537 evalInputDelta=-23.065331361632545
Armijo: th(339.16172406867673)=-22.44799119963981; dx=-0.01935383254679731 evalInputDelta=-23.949382409225855
Armijo: th(84.79043101716918)=-21.69572156009422; dx=-0.04785585848801523 evalInputDelta=-24.701652048771443
Armijo: th(16.958086203433837)=-17.112398192786152; dx=-0.44988861059056273 evalInputDelta=-29.28497541607951
Armijo: th(2.826347700572306)=-6.3879153053653335; dx=0.10469849210305793 evalInputDelta=-40.00945830350033
Armijo: th(0.40376395722461517)=-1.0103463875723868; dx=0.8362272732186511 evalInputDelta=-45.38702722129328
Armijo: th(0.050470494653076896)=-22.904344236449475; dx=325.46315178475254 evalInputDelta=-23.49302937241619
New Minimum: -46.397373608865664 > -48.15806279569005
END: th(0.005607832739230766)=-48.15806279569005; dx=-319.7133681022309 evalInputDelta=1.7606891868243864
Fitness changed from -46.397373608865664 to -48.15806279569005
Iteration 33 complete. Error: -48.15806279569005 Total: 13.0826; Orientation: 0.4591; Line Search: 11.5376
Adding measurement 6fa73b27 to history. Total: 4
Accepted: LBFGS Orientation magnitude: 7.730e+03, gradient 8.218e-02, dot 0.214; [1e3b78e3-fb1f-47c5-8286-970073a51bc7 = 1.000/1.000e+00]
th(0)=-48.15806279569005;dx=-136.25618140588932
Armijo: th(0.012081709389295285)=-47.903165034125095; dx=-30.241701590887118 evalInputDelta=-0.2548977615649548
New Minimum: -48.15806279569005 > -48.24329964379666
END: th(0.006040854694647642)=-48.24329964379666; dx=-76.06610747714875 evalInputDelta=0.08523684810661081
Fitness changed from -48.15806279569005 to -48.24329964379666
Iteration 34 complete. Error: -48.24329964379666 Total: 5.0914; Orientation: 0.5907; Line Search: 3.4153
Adding measurement 526a3b8b to history. Total: 5
Accepted: LBFGS Orientation magnitude: 3.993e+03, gradient 9.075e-02, dot 0.139; [1e3b78e3-fb1f-47c5-8286-970073a51bc7 = 1.000/1.000e+00]
th(0)=-48.24329964379666;dx=-50.253427127722645
Armijo: th(0.013014626911590844)=-47.975931138889074; dx=-22.82665821265084 evalInputDelta=-0.2673685049075871
Armijo: th(0.006507313455795422)=-48.1538482077447; dx=-35.00073651894564 evalInputDelta=-0.08945143605195938
Armijo: th(0.002169104485265141)=-48.22352985481592; dx=-44.0406356336599 evalInputDelta=-0.019769788980738667
Armijo: th(5.422761213162852E-4)=-48.23939288302937; dx=-47.80240207819523 evalInputDelta=-0.003906760767293349
Armijo: th(1.0845522426325704E-4)=-48.242603451958864; dx=-49.669108772452056 evalInputDelta=-6.961918377967891E-4
Armijo: th(1.807587071054284E-5)=-48.243200188434926; dx=-49.80739360315698 evalInputDelta=-9.945536173461278E-5
Armijo: th(2.582267244363263E-6)=-48.243271796316044; dx=-50.19930893012102 evalInputDelta=-2.784748061657183E-5
Armijo: th(3.2278340554540785E-7)=-48.24329964379666; dx=-50.113329151954034 evalInputDelta=0.0
Armijo: th(3.586482283837865E-8)=-48.24329765469143; dx=-50.20334525100714 evalInputDelta=-1.989105228972221E-6
Armijo: th(3.5864822838378654E-9)=-48.24329964379666; dx=-50.07539122087905 evalInputDelta=0.0
Armijo: th(3.260438439852605E-10)=-48.24329964379666; dx=-50.20154887573563 evalInputDelta=0.0
MIN ALPHA (2.717032033210504E-11): th(0.0)=-48.24329964379666
Fitness changed from -48.24329964379666 to -48.24329964379666
Static Iteration Total: 16.6745; Orientation: 0.7034; Line Search: 14.8640
Iteration 35 failed. Error: -48.24329964379666
Previous Error: 0.0 -> -48.24329964379666
Retrying iteration 35
Reset training subject: 4126064377624
Adding measurement 6b966fac to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-48.24329964379666;dx=-0.008217717407192952
WOLFE (weak): th(2.1544346900318838E-10)=-48.24329964379666; dx=-0.008221045494592894 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-48.24329964379666; dx=-0.008214516145624243 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-48.24329964379666; dx=-0.008216126748163194 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-48.24329964379666; dx=-0.008218529591308713 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-48.24329964379666; dx=-0.008213201735133104 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229565E-7)=-48.24329964379666; dx=-0.00821334006292353 evalInputDelta=0.0
Armijo: th(1.0858350837760695E-6)=-48.24329765469143; dx=-0.008218325167184843 evalInputDelta=-1.989105228972221E-6
Armijo: th(6.204771907291826E-7)=-48.24329964379666; dx=-0.008216403008535052 evalInputDelta=0.0
WOLFE (weak): th(3.877982442057391E-7)=-48.24329964379666; dx=-0.008216857200824573 evalInputDelta=0.0
Armijo: th(5.041377174674609E-7)=-48.24329964379666; dx=-0.008211795916825936 evalInputDelta=0.0
Armijo: th(4.459679808366E-7)=-48.24329964379666; dx=-0.00822467883457496 evalInputDelta=0.0
WOLFE (weak): th(4.1688311252116955E-7)=-48.24329964379666; dx=-0.008214465017244061 evalInputDelta=0.0
WOLFE (weak): th(4.3142554667888477E-7)=-48.24329964379666; dx=-0.008217711499504655 evalInputDelta=0.0
Armijo: th(4.386967637577424E-7)=-48.24329964379666; dx=-0.008215237948425385 evalInputDelta=0.0
Armijo: th(4.3506115521831357E-7)=-48.24329964379666; dx=-0.008215958571721298 evalInputDelta=0.0
Armijo: th(4.3324335094859914E-7)=-48.24329964379666; dx=-0.008211637201873252 evalInputDelta=0.0
Armijo: th(4.3233444881374195E-7)=-48.24329964379666; dx=-0.00821987487633765 evalInputDelta=0.0
WOLFE (weak): th(4.3187999774631333E-7)=-48.24329964379666; dx=-0.008214906279509132 evalInputDelta=0.0
WOLFE (weak): th(4.321072232800276E-7)=-48.24329964379666; dx=-0.0082138270393458 evalInputDelta=0.0
WOLFE (weak): th(4.322208360468848E-7)=-48.24329964379666; dx=-0.008218653677436651 evalInputDelta=0.0
WOLFE (weak): th(4.3227764243031336E-7)=-48.24329964379666; dx=-0.008221350254038064 evalInputDelta=0.0
WOLFE (weak): th(4.3230604562202763E-7)=-48.24329964379666; dx=-0.00822412279402436 evalInputDelta=0.0
WOLFE (weak): th(4.3232024721788477E-7)=-48.24329964379666; dx=-0.008214541467511749 evalInputDelta=0.0
Armijo: th(4.3232734801581333E-7)=-48.24329964379666; dx=-0.008217118736350284 evalInputDelta=0.0
Armijo: th(4.3232379761684905E-7)=-48.24329964379666; dx=-0.00822070190789519 evalInputDelta=0.0
mu ~= nu (4.3232024721788477E-7): th(0.0)=-48.24329964379666
Fitness changed from -48.24329964379666 to -48.24329964379666
Static Iteration Total: 32.9265; Orientation: 0.0198; Line Search: 30.7449
Iteration 36 failed. Error: -48.24329964379666
Previous Error: 0.0 -> -48.24329964379666
Optimization terminated 36
Final threshold in iteration 36: -48.24329964379666 (> -Infinity) after 279.304s (< 3600.000s)

Returns

    -48.24329964379666