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

BasicOptimizer.scala:89 executed in 181.64 seconds (2.359 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: 1804486920761
Reset training subject: 1805761773283
Adding measurement 5680f5be to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.749640537586283;dx=-3.1898141828560296E-4
New Minimum: -0.749640537586283 > -0.750256137025794
WOLFE (weak): th(2.154434690031884)=-0.750256137025794; dx=-3.1823315900274913E-4 evalInputDelta=6.155994395109499E-4
New Minimum: -0.750256137025794 > -0.7508721049548103
WOLFE (weak): th(4.308869380063768)=-0.7508721049548103; dx=-3.1686052801299907E-4 evalInputDelta=0.0012315673685272532
New Minimum: -0.7508721049548103 > -0.7533347379902035
WOLFE (weak): th(12.926608140191302)=-0.7533347379902035; dx=-3.17409150829145E-4 evalInputDelta=0.0036942004039204335
New Minimum: -0.7533347379902035 > -0.7645306453862266
WOLFE (weak): th(51.70643256076521)=-0.7645306453862266; dx=-3.1973076666380054E-4 evalInputDelta=0.014890107799943597
New Minimum: -0.7645306453862266 > -0.8255302877917647
WOLFE (weak): th(258.53216280382605)=-0.8255302877917647; dx=-3.2689207609535025E-4 evalInputDelta=0.07588975020548172
New Minimum: -0.8255302877917647 > -1.208633002030311
END: th(1551.1929768229563)=-1.208633002030311; dx=-2.7492077025333974E-4 evalInputDelta=0.4589924644440281
Fitness changed from -0.749640537586283 to -1.208633002030311
Iteration 1 complete. Error: -1.208633002030311 Total: 10.4264; Orientation: 0.1501; Line Search: 7.1151
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3d8246da-01b5-4bc1-af45-f684c068d839.jpg)
Adding measurement 59c908d9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1.208633002030311;dx=-3.5034575560693825E-4
New Minimum: -1.208633002030311 > -2.1791940219346224
END: th(3341.943960201201)=-2.1791940219346224; dx=-2.4330104978656237E-4 evalInputDelta=0.9705610199043113
Fitness changed from -1.208633002030311 to -2.1791940219346224
Iteration 2 complete. Error: -2.1791940219346224 Total: 2.7973; Orientation: 0.0194; Line Search: 1.8588
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2d315570-a782-49fd-9579-5ed5a04307bf.jpg)
Adding measurement 22308344 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-2.1791940219346224;dx=-3.3836690309977876E-4
New Minimum: -2.1791940219346224 > -3.6223654545767783
END: th(7200.000000000001)=-3.6223654545767783; dx=-1.1290966576536524E-4 evalInputDelta=1.4431714326421559
Fitness changed from -2.1791940219346224 to -3.6223654545767783
Iteration 3 complete. Error: -3.6223654545767783 Total: 2.8131; Orientation: 0.0228; Line Search: 1.8628
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/47cd99ba-38c1-47c8-aa7f-c4b7c4b45974.jpg)
Adding measurement 10f7b141 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.787e+03, gradient 2.709e-02, dot -0.190; [52176bce-6e0b-4672-869b-084f219e19e6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.6223654545767783, -2.1791940219346224, -1.208633002030311, -0.749640537586283
LBFGS Accumulation History: 3 points
Removed measurement 10f7b141 to history. Total: 3
th(0)=-3.6223654545767783;dx=-7.333956445108197E-4
New Minimum: -3.6223654545767783 > -6.664474349359557
END: th(15511.929768229566)=-6.664474349359557; dx=-4.489498601103723E-5 evalInputDelta=3.0421088947827783
Fitness changed from -3.6223654545767783 to -6.664474349359557
Iteration 4 complete. Error: -6.664474349359557 Total: 3.2901; Orientation: 0.5280; Line Search: 1.8491
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/0a656f5d-b3b1-4be6-a7e3-7e1120d30441.jpg)
Adding measurement 7467e0e0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.967e+03, gradient 4.193e-02, dot -0.122; [52176bce-6e0b-4672-869b-084f219e19e6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.664474349359557, -2.1791940219346224, -1.208633002030311, -0.749640537586283
LBFGS Accumulation History: 3 points
Removed measurement 7467e0e0 to history. Total: 3
th(0)=-6.664474349359557;dx=-0.001757263311014151
New Minimum: -6.664474349359557 > -8.738566749079908
WOLF (strong): th(33419.43960201202)=-8.738566749079908; dx=2.7943232900663615E-5 evalInputDelta=2.0740923997203513
New Minimum: -8.738566749079908 > -10.738908945709442
WOLF (strong): th(16709.71980100601)=-10.738908945709442; dx=1.4866796626963846E-5 evalInputDelta=4.074434596349885
New Minimum: -10.738908945709442 > -11.031428089811563
END: th(5569.906600335336)=-11.031428089811563; dx=-3.9566776731764914E-4 evalInputDelta=4.366953740452006
Fitness changed from -6.664474349359557 to -11.031428089811563
Iteration 5 complete. Error: -11.031428089811563 Total: 5.1979; Orientation: 0.5227; Line Search: 3.7607
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/5bd9ca4e-73d4-4517-98ae-96c280a1406b.jpg)
Adding measurement 21f411b9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.379e+06, gradient 4.304e-02, dot -0.118; [52176bce-6e0b-4672-869b-084f219e19e6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -11.031428089811563, -2.1791940219346224, -1.208633002030311, -0.749640537586283
LBFGS Accumulation History: 3 points
Removed measurement 21f411b9 to history. Total: 3
th(0)=-11.031428089811563;dx=-0.0018517640025318203
New Minimum: -11.031428089811563 > -16.02106900614342
END: th(12000.000000000004)=-16.02106900614342; dx=-1.7013041752987184E-4 evalInputDelta=4.989640916331858
Fitness changed from -11.031428089811563 to -16.02106900614342
Iteration 6 complete. Error: -16.02106900614342 Total: 3.3968; Orientation: 0.5223; Line Search: 1.9613
Adding measurement 105bd3e4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.226e+03, gradient 6.179e-02, dot -0.044; [52176bce-6e0b-4672-869b-084f219e19e6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.02106900614342, -2.1791940219346224, -1.208633002030311, -0.749640537586283
LBFGS Accumulation History: 3 points
Removed measurement 105bd3e4 to history. Total: 3
th(0)=-16.02106900614342;dx=-0.003817399076767516
New Minimum: -16.02106900614342 > -17.417238557664913
WOLF (strong): th(25853.216280382614)=-17.417238557664913; dx=1.249404597148752E-4 evalInputDelta=1.396169551521492
New Minimum: -17.417238557664913 > -22.89587050606438
WOLF (strong): th(12926.608140191307)=-22.89587050606438; dx=1.5964068668977604E-4 evalInputDelta=6.8748014999209595
New Minimum: -22.89587050606438 > -23.8311716802247
END: th(4308.869380063769)=-23.8311716802247; dx=-8.247114416747996E-4 evalInputDelta=7.8101026740812785
Fitness changed from -16.02106900614342 to -23.8311716802247
Iteration 7 complete. Error: -23.8311716802247 Total: 5.2088; Orientation: 0.4777; Line Search: 3.8428
Adding measurement 69591824 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 2.502e+03, gradient 5.386e-02, dot 0.168; [52176bce-6e0b-4672-869b-084f219e19e6 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-23.8311716802247;dx=-22.661418408786055
Armijo: th(9283.177667225562)=-9.206601171276679; dx=-1.3299428199520436E-4 evalInputDelta=-14.62457050894802
Armijo: th(4641.588833612781)=-9.04940628717656; dx=-2.6009528817175296E-4 evalInputDelta=-14.78176539304814
Armijo: th(1547.196277870927)=-8.466950735698312; dx=-7.724911348723503E-4 evalInputDelta=-15.364220944526387
Armijo: th(386.7990694677317)=-6.571998624777113; dx=-0.004000374447412653 evalInputDelta=-17.259173055447587
Armijo: th(77.35981389354635)=-5.1582160669328365; dx=-0.032288294227400566 evalInputDelta=-18.67295561329186
Armijo: th(12.893302315591058)=-5.895637787540463; dx=0.36217920642117096 evalInputDelta=-17.935533892684237
Armijo: th(1.8419003307987225)=-17.400102882519562; dx=1.7513541764716953 evalInputDelta=-6.431068797705137
New Minimum: -23.8311716802247 > -24.949635547735838
END: th(0.2302375413498403)=-24.949635547735838; dx=-4.2418729513598015 evalInputDelta=1.1184638675111387
Fitness changed from -23.8311716802247 to -24.949635547735838
Iteration 8 complete. Error: -24.949635547735838 Total: 9.9463; Orientation: 0.5108; Line Search: 8.5556
Adding measurement 7165f528 to history. Total: 4
Rejected: LBFGS Orientation magni

...skipping 12573 bytes...

)=-49.65026120273689; dx=-190.35361861561097 evalInputDelta=4.91720751227831E-6
WOLFE (weak): th(1.1741549169646529E-7)=-49.65026120273689; dx=-189.9551535425547 evalInputDelta=4.91720751227831E-6
WOLFE (weak): th(1.1742485348020762E-7)=-49.6502587441332; dx=-190.21258591737256 evalInputDelta=2.4586038165352875E-6
WOLFE (weak): th(1.174295343720788E-7)=-49.6502587441332; dx=-190.05271618075506 evalInputDelta=2.4586038165352875E-6
WOLFE (weak): th(1.1743187481801439E-7)=-49.6502587441332; dx=-189.57588636989473 evalInputDelta=2.4586038165352875E-6
WOLFE (weak): th(1.1743304504098217E-7)=-49.65026120273689; dx=-190.1955583393171 evalInputDelta=4.91720751227831E-6
mu ~= nu (1.1743304504098217E-7): th(1.1503759862591019E-7)=-49.65026120273689
Fitness changed from -49.65025628552938 to -49.65026120273689
Iteration 16 complete. Error: -49.65026120273689 Total: 21.7666; Orientation: 1.9719; Line Search: 18.8885
Adding measurement 1c60e388 to history. Total: 5
Accepted: LBFGS Orientation magnitude: 7.872e+06, gradient 6.922e-02, dot 0.138; [52176bce-6e0b-4672-869b-084f219e19e6 = 1.000/1.000e+00]
th(0)=-49.65026120273689;dx=-75311.78972402895
New Minimum: -49.65026120273689 > -49.66245437954109
WOLFE (weak): th(2.5300308657684715E-7)=-49.66245437954109; dx=-70199.61979443382 evalInputDelta=0.01219317680419607
New Minimum: -49.66245437954109 > -49.67470108349294
WOLFE (weak): th(5.060061731536943E-7)=-49.67470108349294; dx=-70402.12235711594 evalInputDelta=0.024439880756048638
New Minimum: -49.67470108349294 > -49.7234613379024
WOLFE (weak): th(1.5180185194610829E-6)=-49.7234613379024; dx=-70617.99031579225 evalInputDelta=0.07320013516550716
New Minimum: -49.7234613379024 > -49.936915770205765
WOLFE (weak): th(6.0720740778443315E-6)=-49.936915770205765; dx=-70737.61248405547 evalInputDelta=0.2866545674688723
New Minimum: -49.936915770205765 > -50.905856735743086
END: th(3.0360370389221657E-5)=-50.905856735743086; dx=-61634.73455113125 evalInputDelta=1.2555955330061934
Fitness changed from -49.65026120273689 to -50.905856735743086
Iteration 17 complete. Error: -50.905856735743086 Total: 8.6582; Orientation: 0.8110; Line Search: 6.9688
Adding measurement 222194aa to history. Total: 6
Accepted: LBFGS Orientation magnitude: 7.660e+06, gradient 7.173e-02, dot 0.122; [52176bce-6e0b-4672-869b-084f219e19e6 = 1.000/1.000e+00]
th(0)=-50.905856735743086;dx=-67101.64369342335
New Minimum: -50.905856735743086 > -52.03463061465052
END: th(6.540943516875594E-5)=-52.03463061465052; dx=-36766.45180998955 evalInputDelta=1.128773878907431
Fitness changed from -50.905856735743086 to -52.03463061465052
Iteration 18 complete. Error: -52.03463061465052 Total: 3.5351; Orientation: 0.7828; Line Search: 1.8605
Adding measurement 6add2d1a to history. Total: 7
Accepted: LBFGS Orientation magnitude: 5.007e+06, gradient 7.327e-02, dot 0.078; [52176bce-6e0b-4672-869b-084f219e19e6 = 1.000/1.000e+00]
th(0)=-52.03463061465052;dx=-28704.348478141997
Armijo: th(1.409203561829593E-4)=-51.826351435587284; dx=-13010.624714319722 evalInputDelta=-0.2082791790632328
New Minimum: -52.03463061465052 > -52.06099234386649
END: th(7.046017809147965E-5)=-52.06099234386649; dx=-17124.505484689893 evalInputDelta=0.026361729215970797
Fitness changed from -52.03463061465052 to -52.06099234386649
Iteration 19 complete. Error: -52.06099234386649 Total: 4.5579; Orientation: 0.8663; Line Search: 2.8078
Adding measurement 36aa1d53 to history. Total: 8
Accepted: LBFGS Orientation magnitude: 3.798e+06, gradient 7.468e-02, dot 0.058; [52176bce-6e0b-4672-869b-084f219e19e6 = 1.000/1.000e+00]
th(0)=-52.06099234386649;dx=-16486.83703440202
Armijo: th(1.5180185194610827E-4)=-51.51858451841675; dx=-7510.3272360060155 evalInputDelta=-0.542407825449736
Armijo: th(7.590092597305414E-5)=-51.89305973285349; dx=-9699.564059912762 evalInputDelta=-0.1679326110130006
Armijo: th(2.5300308657684713E-5)=-52.034949662012025; dx=-11695.498294481375 evalInputDelta=-0.026042681854463012
Armijo: th(6.325077164421178E-6)=-52.05630262108638; dx=-17068.338742528078 evalInputDelta=-0.00468972278010682
Armijo: th(1.2650154328842357E-6)=-52.06009663945482; dx=-12764.066030708436 evalInputDelta=-8.957044116684187E-4
Armijo: th(2.1083590548070596E-7)=-52.06084931356768; dx=-12837.169655643107 evalInputDelta=-1.4303029880835538E-4
Armijo: th(3.011941506867228E-8)=-52.0609735858169; dx=-12969.88544814047 evalInputDelta=-1.8758049584732817E-5
Armijo: th(3.764926883584035E-9)=-52.060987654354726; dx=-12921.718985015646 evalInputDelta=-4.6895117620238125E-6
Armijo: th(4.1832520928711497E-10)=-52.06099234386649; dx=-12941.968053819284 evalInputDelta=0.0
MIN ALPHA (4.1832520928711494E-11): th(0.0)=-52.06099234386649
Fitness changed from -52.06099234386649 to -52.06099234386649
Static Iteration Total: 12.1729; Orientation: 0.9942; Line Search: 10.3036
Iteration 20 failed. Error: -52.06099234386649
Previous Error: 0.0 -> -52.06099234386649
Retrying iteration 20
Reset training subject: 1958101880474
Adding measurement 6614c3fd to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-52.06099234386649;dx=-0.005575218893825186
WOLFE (weak): th(2.1544346900318838E-10)=-52.06099234386649; dx=-0.005552552494694682 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-52.06099234386649; dx=-0.005552733622385401 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-52.06099234386649; dx=-0.005553478552509568 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-52.06099234386649; dx=-0.005552893579461801 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-52.06099234386649; dx=-0.0055531751879213985 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229565E-7)=-52.06099234386649; dx=-0.005552682801487931 evalInputDelta=0.0
WOLFE (weak): th(1.0858350837760695E-6)=-52.06099234386649; dx=-0.0055530770248684025 evalInputDelta=0.0
Armijo: th(8.686680670208556E-6)=-52.06099234386649; dx=-0.00555330307142846 evalInputDelta=0.0
Armijo: th(4.886257876992313E-6)=-52.06098999911066; dx=-0.0055526176969287865 evalInputDelta=-2.344755827721201E-6
WOLFE (weak): th(2.986046480384191E-6)=-52.06099234386649; dx=-0.005552732060074077 evalInputDelta=0.0
Armijo: th(3.936152178688252E-6)=-52.06099234386649; dx=-0.005553242445580679 evalInputDelta=0.0
Armijo: th(3.4610993295362216E-6)=-52.06099234386649; dx=-0.005553166832098819 evalInputDelta=0.0
Armijo: th(3.2235729049602066E-6)=-52.06099234386649; dx=-0.005553068315369637 evalInputDelta=0.0
WOLFE (weak): th(3.104809692672199E-6)=-52.06099234386649; dx=-0.005553205930994705 evalInputDelta=0.0
WOLFE (weak): th(3.1641912988162028E-6)=-52.06099234386649; dx=-0.005553393663062473 evalInputDelta=0.0
Armijo: th(3.193882101888205E-6)=-52.06099234386649; dx=-0.005552841783661168 evalInputDelta=0.0
WOLFE (weak): th(3.179036700352204E-6)=-52.06099234386649; dx=-0.005553773199706862 evalInputDelta=0.0
Armijo: th(3.1864594011202045E-6)=-52.06099234386649; dx=-0.00555339110041134 evalInputDelta=0.0
WOLFE (weak): th(3.1827480507362043E-6)=-52.06099234386649; dx=-0.005553445517280099 evalInputDelta=0.0
WOLFE (weak): th(3.1846037259282044E-6)=-52.06099234386649; dx=-0.005552827174696226 evalInputDelta=0.0
WOLFE (weak): th(3.1855315635242046E-6)=-52.06099234386649; dx=-0.00555227744778335 evalInputDelta=0.0
WOLFE (weak): th(3.1859954823222045E-6)=-52.06099234386649; dx=-0.0055536853942659455 evalInputDelta=0.0
Armijo: th(3.1862274417212045E-6)=-52.06099234386649; dx=-0.005553074660465021 evalInputDelta=0.0
WOLFE (weak): th(3.1861114620217045E-6)=-52.06099234386649; dx=-0.005552507717899367 evalInputDelta=0.0
Armijo: th(3.1861694518714545E-6)=-52.06099234386649; dx=-0.005553387177669878 evalInputDelta=0.0
WOLFE (weak): th(3.1861404569465797E-6)=-52.06099234386649; dx=-0.005553113952942602 evalInputDelta=0.0
mu ~= nu (3.1861404569465797E-6): th(0.0)=-52.06099234386649
Fitness changed from -52.06099234386649 to -52.06099234386649
Static Iteration Total: 28.0033; Orientation: 0.0192; Line Search: 26.2404
Iteration 21 failed. Error: -52.06099234386649
Previous Error: 0.0 -> -52.06099234386649
Optimization terminated 21
Final threshold in iteration 21: -52.06099234386649 (> -Infinity) after 181.619s (< 3600.000s)

Returns

    -52.06099234386649