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

BasicOptimizer.scala:89 executed in 237.02 seconds (3.288 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: 4637151391280
Reset training subject: 4638290987146
Adding measurement 2164740 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-5.2602910125352444;dx=-4.7736350388038757E-4
New Minimum: -5.2602910125352444 > -5.2611465089918195
WOLFE (weak): th(2.154434690031884)=-5.2611465089918195; dx=-4.7669825123592904E-4 evalInputDelta=8.554964565750112E-4
New Minimum: -5.2611465089918195 > -5.262003667810225
WOLFE (weak): th(4.308869380063768)=-5.262003667810225; dx=-4.7462347241338757E-4 evalInputDelta=0.0017126552749804347
New Minimum: -5.262003667810225 > -5.265413304991997
WOLFE (weak): th(12.926608140191302)=-5.265413304991997; dx=-4.778393738900388E-4 evalInputDelta=0.00512229245675222
New Minimum: -5.265413304991997 > -5.280761739567173
WOLFE (weak): th(51.70643256076521)=-5.280761739567173; dx=-4.7542726533409253E-4 evalInputDelta=0.020470727031928426
New Minimum: -5.280761739567173 > -5.361120400354526
WOLFE (weak): th(258.53216280382605)=-5.361120400354526; dx=-4.549866180581077E-4 evalInputDelta=0.10082938781928164
New Minimum: -5.361120400354526 > -5.842594752394037
END: th(1551.1929768229563)=-5.842594752394037; dx=-4.0095982553332415E-4 evalInputDelta=0.5823037398587925
Fitness changed from -5.2602910125352444 to -5.842594752394037
Iteration 1 complete. Error: -5.842594752394037 Total: 11.3767; Orientation: 0.0208; Line Search: 8.0308
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0975ebc8-e5d3-46cc-ace5-e30991d55648.jpg)
Adding measurement 10d9f008 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-5.842594752394037;dx=-4.540087865866392E-4
New Minimum: -5.842594752394037 > -7.16770346047089
END: th(3341.943960201201)=-7.16770346047089; dx=-3.21640011875078E-4 evalInputDelta=1.3251087080768533
Fitness changed from -5.842594752394037 to -7.16770346047089
Iteration 2 complete. Error: -7.16770346047089 Total: 3.4402; Orientation: 0.0191; Line Search: 2.2975
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/f06e133a-61a6-4ef1-9276-5e5ccb5d4f1f.jpg)
Adding measurement 1cad6536 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-7.16770346047089;dx=-5.792103178935471E-4
New Minimum: -7.16770346047089 > -10.308388548854131
END: th(7200.000000000001)=-10.308388548854131; dx=-2.626235052449886E-4 evalInputDelta=3.1406850883832407
Fitness changed from -7.16770346047089 to -10.308388548854131
Iteration 3 complete. Error: -10.308388548854131 Total: 3.4284; Orientation: 0.0202; Line Search: 2.2798
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/1d328397-9e8f-4c18-ac93-7096ddfbbbc6.jpg)
Adding measurement fbf8098 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.681e+03, gradient 3.362e-02, dot -0.311; [d3c9f127-ef11-469e-805e-bc81b727b68f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -10.308388548854131, -7.16770346047089, -5.842594752394037, -5.2602910125352444
LBFGS Accumulation History: 3 points
Removed measurement fbf8098 to history. Total: 3
th(0)=-10.308388548854131;dx=-0.0011268952163020537
New Minimum: -10.308388548854131 > -16.095465739801416
END: th(15511.929768229566)=-16.095465739801416; dx=-4.7839468897228595E-5 evalInputDelta=5.787077190947285
Fitness changed from -10.308388548854131 to -16.095465739801416
Iteration 4 complete. Error: -16.095465739801416 Total: 3.9000; Orientation: 0.4788; Line Search: 2.2979
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/1eeedaaa-ed68-4a00-9d82-2393d51a6587.jpg)
Adding measurement 769c69c6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.400e+03, gradient 7.258e-02, dot -0.080; [d3c9f127-ef11-469e-805e-bc81b727b68f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.095465739801416, -7.16770346047089, -5.842594752394037, -5.2602910125352444
LBFGS Accumulation History: 3 points
Removed measurement 769c69c6 to history. Total: 3
th(0)=-16.095465739801416;dx=-0.005261558153121279
New Minimum: -16.095465739801416 > -21.021511092112146
WOLF (strong): th(33419.43960201202)=-21.021511092112146; dx=1.399667556061615E-4 evalInputDelta=4.92604535231073
New Minimum: -21.021511092112146 > -22.91127494067209
WOLF (strong): th(16709.71980100601)=-22.91127494067209; dx=2.3245564085140806E-5 evalInputDelta=6.8158092008706745
New Minimum: -22.91127494067209 > -24.963458261300723
END: th(5569.906600335336)=-24.963458261300723; dx=-7.036810867291148E-4 evalInputDelta=8.867992521499307
Fitness changed from -16.095465739801416 to -24.963458261300723
Iteration 5 complete. Error: -24.963458261300723 Total: 6.1917; Orientation: 0.4684; Line Search: 4.6017
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/cce24533-642f-4e75-bc5b-fbe862771830.jpg)
Adding measurement 7fb34e05 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.956e+05, gradient 8.861e-02, dot -0.084; [d3c9f127-ef11-469e-805e-bc81b727b68f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -24.963458261300723, -7.16770346047089, -5.842594752394037, -5.2602910125352444
LBFGS Accumulation History: 3 points
Removed measurement 7fb34e05 to history. Total: 3
th(0)=-24.963458261300723;dx=-0.007849003877277546
New Minimum: -24.963458261300723 > -29.224528185508234
WOLF (strong): th(12000.000000000004)=-29.224528185508234; dx=4.6865517985214495E-4 evalInputDelta=4.261069924207511
New Minimum: -29.224528185508234 > -33.4905011570928
END: th(6000.000000000002)=-33.4905011570928; dx=-1.497773080316209E-4 evalInputDelta=8.527042895792079
Fitness changed from -24.963458261300723 to -33.4905011570928
Iteration 6 complete. Error: -33.4905011570928 Total: 5.0209; Orientation: 0.4637; Line Search: 3.4449
Adding measurement 9c0673 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.610e+05, gradient 1.040e-01, dot -0.106; [d3c9f127-ef11-469e-805e-bc81b727b68f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.4905011570928, -7.16770346047089, -5.842594752394037, -5.2602910125352444
LBFGS Accumulation History: 3 points
Removed measurement 9c0673 to history. Total: 3
th(0)=-33.4905011570928;dx=-0.010821865103054568
New Minimum: -33.4905011570928 > -39.79785126811711
WOLF (strong): th(12926.608140191307)=-39.79785126811711; dx=3.4455669401356134E-4 evalInputDelta=6.307350111024306
New Minimum: -39.79785126811711 > -46.81740531627177
WOLF (strong): th(6463.3040700956535)=-46.81740531627177; dx=5.403515455517202E-4 evalInputDelta=13.326904159178966
New Minimum: -46.81740531627177 > -47.58884689569847
END: th(2154.4346900318847)=-47.58884689569847; dx=-0.0030868047979511434 evalInputDelta=14.098345738605666
Fitness changed from -33.4905011570928 to -47.58884689569847
Iteration 7 complete. Error: -47.58884689569847 Total: 6.1269; Orientation: 0.4714; Line Search: 4.5742
Adding measurement 4cea7719 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.807e+03, gradient 9.789e-02, dot 0.192; [d3c9f127-ef11-469e-805e-bc81b727b68f = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-47.58884689569847;dx=-33.922174801387996
Armijo: th(4641.588833612781)=-31.791726793983173; dx=8.424554802408059E-4 evalInputDelta=-15.797120101715294
Armijo: th(2320.7944168063905)=-31.692704290164375; dx=0.0015953734236940644 evalInputDelta=-15.896142605534092
Armijo: th(773.5981389354635)=-31.204992348985456; dx=0.005857010016461275 evalInputDelta=-16.38385454671301
Armijo: th(193.39953473386586)=-28.89925319170167; dx=0.003573127774583179 evalInputDelta=-18.689593703996795
Armijo: th(38.67990694677317)=-20.55446561684044; dx=-0.1867128187982449 evalInputDelta=-27.034381278858028
Armijo: th(6.446651157795529)=-17.41753949373858; dx=0.7097365945873602 evalInputDelta=-30.171307401959886
New Minimum: -47.58884689569847 > -50.04585632812563
WOLF (strong): th(0.9209501653993613)=-50.04585632812563; dx=3.0533720587349116 evalInputDelta=2.4570094324271636
New Minimum: -50.04585632812563 > -50.806976022968115
END: th(0.11511877067492016)=-50.806976022968115; dx=-21.97321841621928 evalInputDelta=3.2181291272696484
Fitness changed from -47.58884689569847 to -50.80697602296

...skipping 18305 bytes...

2.2437444990154; dx=-0.002976602892790874 evalInputDelta=21.992809328186837
Fitness changed from -150.25093517082857 to -172.2437444990154
Iteration 21 complete. Error: -172.2437444990154 Total: 3.9022; Orientation: 0.4690; Line Search: 2.3135
Adding measurement 5937fe19 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.186e+05, gradient 1.440e-01, dot -0.084; [d3c9f127-ef11-469e-805e-bc81b727b68f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -172.2437444990154, -7.16770346047089, -5.842594752394037, -5.2602910125352444
LBFGS Accumulation History: 3 points
Removed measurement 5937fe19 to history. Total: 3
th(0)=-172.2437444990154;dx=-0.020551572830732882
Armijo: th(11450.014296512998)=-160.02306854887271; dx=0.0013134080759160311 evalInputDelta=-12.220675950142692
New Minimum: -172.2437444990154 > -179.17447290560395
WOLF (strong): th(5725.007148256499)=-179.17447290560395; dx=0.0026384293839717375 evalInputDelta=6.930728406588543
New Minimum: -179.17447290560395 > -189.8143343851728
END: th(1908.3357160854996)=-189.8143343851728; dx=-0.006233973881974034 evalInputDelta=17.570589886157393
Fitness changed from -172.2437444990154 to -189.8143343851728
Iteration 22 complete. Error: -189.8143343851728 Total: 6.1609; Orientation: 0.4610; Line Search: 4.6231
Adding measurement 6188e4ed to history. Total: 3
Accepted: LBFGS Orientation magnitude: 9.639e+03, gradient 1.140e-01, dot 0.177; [d3c9f127-ef11-469e-805e-bc81b727b68f = 1.000/1.000e+00]
th(0)=-189.8143343851728;dx=-194.01988816960875
Armijo: th(4111.384666961437)=-43.930905746305235; dx=0.0015106974431960828 evalInputDelta=-145.88342863886757
Armijo: th(2055.6923334807184)=-44.105566721609776; dx=0.0036490690104347837 evalInputDelta=-145.70876766356304
Armijo: th(685.2307778269061)=-44.43930014663599; dx=0.009884183928946348 evalInputDelta=-145.3750342385368
Armijo: th(171.30769445672652)=-44.42087112574609; dx=0.0472552463345016 evalInputDelta=-145.3934632594267
Armijo: th(34.2615388913453)=-45.8698818801751; dx=0.29447316051670236 evalInputDelta=-143.94445250499768
Armijo: th(5.710256481890884)=-64.50072598348918; dx=5.244457269410353 evalInputDelta=-125.31360840168362
Armijo: th(0.815750925984412)=-175.50873616414844; dx=15.355251347380763 evalInputDelta=-14.305598221024354
New Minimum: -189.8143343851728 > -202.83929549823284
END: th(0.1019688657480515)=-202.83929549823284; dx=-111.1876395755383 evalInputDelta=13.024961113060044
Fitness changed from -189.8143343851728 to -202.83929549823284
Iteration 23 complete. Error: -202.83929549823284 Total: 11.9390; Orientation: 0.4530; Line Search: 10.3885
Adding measurement 46109a41 to history. Total: 4
Accepted: LBFGS Orientation magnitude: 6.677e+03, gradient 1.213e-01, dot 0.087; [d3c9f127-ef11-469e-805e-bc81b727b68f = 1.000/1.000e+00]
th(0)=-202.83929549823284;dx=-70.20405110757544
New Minimum: -202.83929549823284 > -205.42708193026866
END: th(0.2196852616708061)=-205.42708193026866; dx=-26.697399027233057 evalInputDelta=2.587786432035813
Fitness changed from -202.83929549823284 to -205.42708193026866
Iteration 24 complete. Error: -205.42708193026866 Total: 3.9795; Orientation: 0.6094; Line Search: 2.2907
Adding measurement 6fdcc32c to history. Total: 5
Accepted: LBFGS Orientation magnitude: 3.680e+03, gradient 1.375e-01, dot 0.016; [d3c9f127-ef11-469e-805e-bc81b727b68f = 1.000/1.000e+00]
th(0)=-205.42708193026866;dx=-7.973766452909219
Armijo: th(0.47329754863231643)=-191.47418765196343; dx=9.506665685330923 evalInputDelta=-13.952894278305223
Armijo: th(0.23664877431615822)=-199.18723106344032; dx=6.19895710088443 evalInputDelta=-6.239850866828334
Armijo: th(0.07888292477205273)=-203.64139563549696; dx=2.4464195742175097 evalInputDelta=-1.7856862947716934
Armijo: th(0.019720731193013184)=-205.01387766106572; dx=-0.037571177202109673 evalInputDelta=-0.41320426920293585
Armijo: th(0.003944146238602637)=-205.34705388007993; dx=-0.6113990805909804 evalInputDelta=-0.08002805018873005
Armijo: th(6.573577064337728E-4)=-205.41377759008822; dx=-0.7030673812849244 evalInputDelta=-0.013304340180440022
Armijo: th(9.390824377625326E-5)=-205.42518136299722; dx=-0.7049958747407964 evalInputDelta=-0.0019005672714342836
Armijo: th(1.1738530472031658E-5)=-205.42680892168687; dx=-0.7347344675029487 evalInputDelta=-2.7300858178591625E-4
Armijo: th(1.304281163559073E-6)=-205.427039928972; dx=-0.7280862329694685 evalInputDelta=-4.2001296662874665E-5
Armijo: th(1.304281163559073E-7)=-205.4270609296214; dx=-0.7124398639176259 evalInputDelta=-2.1000647251412374E-5
Armijo: th(1.1857101486900663E-8)=-205.4270714299453; dx=-0.6926115392581231 evalInputDelta=-1.0500323355699948E-5
END: th(9.880917905750553E-10)=-205.42708193026866; dx=-0.7273575290448442 evalInputDelta=0.0
Fitness changed from -205.42708193026866 to -205.42708193026866
Static Iteration Total: 18.2674; Orientation: 0.7965; Line Search: 16.3859
Iteration 25 failed. Error: -205.42708193026866
Previous Error: 0.0 -> -205.42708193026866
Retrying iteration 25
Reset training subject: 4841967351345
Adding measurement 167cba1 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-205.42708193026866;dx=-0.018898066691016638
WOLFE (weak): th(2.1287792305506184E-9)=-205.42708193026866; dx=-0.018701937443809984 evalInputDelta=0.0
WOLFE (weak): th(4.257558461101237E-9)=-205.42708193026866; dx=-0.0187009429556063 evalInputDelta=0.0
WOLFE (weak): th(1.277267538330371E-8)=-205.42708193026866; dx=-0.01870027103631136 evalInputDelta=0.0
WOLFE (weak): th(5.109070153321484E-8)=-205.42708193026866; dx=-0.018699983088233996 evalInputDelta=0.0
WOLFE (weak): th(2.554535076660742E-7)=-205.42708193026866; dx=-0.018699631373184214 evalInputDelta=0.0
Armijo: th(1.532721045996445E-6)=-205.42708193026866; dx=-0.018698789463304607 evalInputDelta=0.0
Armijo: th(8.940872768312597E-7)=-205.42708193026866; dx=-0.01869913276925575 evalInputDelta=0.0
Armijo: th(5.747703922486669E-7)=-205.4270714299453; dx=-0.018701230861276757 evalInputDelta=-1.0500323355699948E-5
WOLFE (weak): th(4.151119499573705E-7)=-205.42708193026866; dx=-0.018701217527135355 evalInputDelta=0.0
WOLFE (weak): th(4.949411711030188E-7)=-205.42708193026866; dx=-0.01869953780409913 evalInputDelta=0.0
Armijo: th(5.348557816758429E-7)=-205.4270714299453; dx=-0.01870132248217559 evalInputDelta=-1.0500323355699948E-5
WOLFE (weak): th(5.148984763894308E-7)=-205.42708193026866; dx=-0.018703447260068874 evalInputDelta=0.0
WOLFE (weak): th(5.248771290326368E-7)=-205.42708193026866; dx=-0.018700301688121507 evalInputDelta=0.0
Armijo: th(5.298664553542398E-7)=-205.4270714299453; dx=-0.018700466083772276 evalInputDelta=-1.0500323355699948E-5
WOLFE (weak): th(5.273717921934384E-7)=-205.42708193026866; dx=-0.0187017112524448 evalInputDelta=0.0
WOLFE (weak): th(5.286191237738391E-7)=-205.42708193026866; dx=-0.018701828117369323 evalInputDelta=0.0
Armijo: th(5.292427895640395E-7)=-205.4270714299453; dx=-0.018700851317178926 evalInputDelta=-1.0500323355699948E-5
Armijo: th(5.289309566689393E-7)=-205.4270714299453; dx=-0.018701619765254907 evalInputDelta=-1.0500323355699948E-5
Armijo: th(5.287750402213892E-7)=-205.4270714299453; dx=-0.018700596142010466 evalInputDelta=-1.0500323355699948E-5
Armijo: th(5.286970819976141E-7)=-205.4270714299453; dx=-0.018702039614630492 evalInputDelta=-1.0500323355699948E-5
WOLFE (weak): th(5.286581028857267E-7)=-205.42708193026866; dx=-0.018698796991407834 evalInputDelta=0.0
WOLFE (weak): th(5.286775924416704E-7)=-205.42708193026866; dx=-0.018701762275551925 evalInputDelta=0.0
Armijo: th(5.286873372196422E-7)=-205.4270714299453; dx=-0.018700740853505964 evalInputDelta=-1.0500323355699948E-5
Armijo: th(5.286824648306563E-7)=-205.4270714299453; dx=-0.018701404725131418 evalInputDelta=-1.0500323355699948E-5
mu ~= nu (5.286775924416704E-7): th(0.0)=-205.42708193026866
Fitness changed from -205.42708193026866 to -205.42708193026866
Static Iteration Total: 32.2045; Orientation: 0.0194; Line Search: 30.0156
Iteration 26 failed. Error: -205.42708193026866
Previous Error: 0.0 -> -205.42708193026866
Optimization terminated 26
Final threshold in iteration 26: -205.42708193026866 (> -Infinity) after 237.020s (< 3600.000s)

Returns

    -205.42708193026866