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 186.86 seconds (1.472 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: 5035400140467
Reset training subject: 5036547349673
Adding measurement 9e735f4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.16343620513125903;dx=-2.4361431179022812E-4
New Minimum: -0.16343620513125903 > -0.16394683757197168
WOLFE (weak): th(2.154434690031884)=-0.16394683757197168; dx=-2.293190380484225E-4 evalInputDelta=5.106324407126439E-4
New Minimum: -0.16394683757197168 > -0.1644563092446749
WOLFE (weak): th(4.308869380063768)=-0.1644563092446749; dx=-2.4466607311933697E-4 evalInputDelta=0.001020104113415854
New Minimum: -0.1644563092446749 > -0.16648439533550366
WOLFE (weak): th(12.926608140191302)=-0.16648439533550366; dx=-2.4435040132571355E-4 evalInputDelta=0.0030481902042446274
New Minimum: -0.16648439533550366 > -0.17581759712819242
WOLFE (weak): th(51.70643256076521)=-0.17581759712819242; dx=-2.4962231723158894E-4 evalInputDelta=0.012381391996933389
New Minimum: -0.17581759712819242 > -0.2309316980126072
WOLFE (weak): th(258.53216280382605)=-0.2309316980126072; dx=-2.717694414987145E-4 evalInputDelta=0.06749549288134818
New Minimum: -0.2309316980126072 > -0.7166292581849251
WOLFE (weak): th(1551.1929768229563)=-0.7166292581849251; dx=-3.9610008154422377E-4 evalInputDelta=0.5531930530536661
New Minimum: -0.7166292581849251 > -3.4464777837779117
END: th(10858.350837760694)=-3.4464777837779117; dx=-1.366592140505728E-4 evalInputDelta=3.2830415786466527
Fitness changed from -0.16343620513125903 to -3.4464777837779117
Iteration 1 complete. Error: -3.4464777837779117 Total: 12.9035; Orientation: 0.0179; Line Search: 9.4429
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6c21c000-76fe-4221-a407-4ed47eadb996.jpg)
Adding measurement 751bdc76 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-3.4464777837779117;dx=-0.002067966955462906
New Minimum: -3.4464777837779117 > -8.032296316661403
END: th(23393.607721408407)=-8.032296316661403; dx=-9.772514244982745E-6 evalInputDelta=4.585818532883492
Fitness changed from -3.4464777837779117 to -8.032296316661403
Iteration 2 complete. Error: -8.032296316661403 Total: 3.7810; Orientation: 0.0166; Line Search: 2.4872
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/72bcba2c-7b9a-409f-bf79-91b0e525e590.jpg)
Adding measurement 1415c61f to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-8.032296316661403;dx=-0.0019489463867127326
New Minimum: -8.032296316661403 > -15.80662940291366
WOLF (strong): th(50400.00000000001)=-15.80662940291366; dx=6.467212504278355E-5 evalInputDelta=7.774333086252257
New Minimum: -15.80662940291366 > -18.882370476053104
END: th(25200.000000000004)=-18.882370476053104; dx=-1.5611291247518443E-5 evalInputDelta=10.850074159391701
Fitness changed from -8.032296316661403 to -18.882370476053104
Iteration 3 complete. Error: -18.882370476053104 Total: 4.8366; Orientation: 0.0180; Line Search: 3.5511
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/f6b5be14-8e8e-47f0-8f27-8d7b1b7a7c83.jpg)
Adding measurement 4a46a8b3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.108e+03, gradient 5.044e-02, dot -0.036; [b7454c38-9973-434c-8b24-0c868175cea7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.882370476053104, -8.032296316661403, -3.4464777837779117, -0.16343620513125903
LBFGS Accumulation History: 3 points
Removed measurement 4a46a8b3 to history. Total: 3
th(0)=-18.882370476053104;dx=-0.002303149724082996
New Minimum: -18.882370476053104 > -26.627811480448056
WOLF (strong): th(54291.75418880348)=-26.627811480448056; dx=7.99521001028725E-5 evalInputDelta=7.7454410043949515
New Minimum: -26.627811480448056 > -32.97464587388032
END: th(27145.87709440174)=-32.97464587388032; dx=-5.3436072732267686E-5 evalInputDelta=14.092275397827215
Fitness changed from -18.882370476053104 to -32.97464587388032
Iteration 4 complete. Error: -32.97464587388032 Total: 5.2905; Orientation: 0.4550; Line Search: 3.5765
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/9e63a35a-a66a-48dc-b0f8-632fe51e97a5.jpg)
Adding measurement 2c0819e8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.492e+03, gradient 5.317e-02, dot -0.045; [b7454c38-9973-434c-8b24-0c868175cea7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -32.97464587388032, -8.032296316661403, -3.4464777837779117, -0.16343620513125903
LBFGS Accumulation History: 3 points
Removed measurement 2c0819e8 to history. Total: 3
th(0)=-32.97464587388032;dx=-0.0027949886374563724
New Minimum: -32.97464587388032 > -34.848868037794645
WOLF (strong): th(58484.01930352103)=-34.848868037794645; dx=1.6741231504920165E-4 evalInputDelta=1.8742221639143253
New Minimum: -34.848868037794645 > -46.55438005960744
WOLF (strong): th(29242.009651760516)=-46.55438005960744; dx=3.3154119091010356E-5 evalInputDelta=13.57973418572712
New Minimum: -46.55438005960744 > -47.760779317507215
END: th(9747.336550586839)=-47.760779317507215; dx=-6.903770095572624E-4 evalInputDelta=14.786133443626895
Fitness changed from -32.97464587388032 to -47.760779317507215
Iteration 5 complete. Error: -47.760779317507215 Total: 6.5424; Orientation: 0.4648; Line Search: 4.7971
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/a7471e9e-97e4-4da8-afa7-c625798050bc.jpg)
Adding measurement 73c66eb6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.196e+03, gradient 4.805e-02, dot -0.057; [b7454c38-9973-434c-8b24-0c868175cea7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.760779317507215, -8.032296316661403, -3.4464777837779117, -0.16343620513125903
LBFGS Accumulation History: 3 points
Removed measurement 73c66eb6 to history. Total: 3
th(0)=-47.760779317507215;dx=-0.0022749375395673408
New Minimum: -47.760779317507215 > -59.55712200274624
END: th(21000.000000000007)=-59.55712200274624; dx=-1.6441491227839312E-4 evalInputDelta=11.796342685239026
Fitness changed from -47.760779317507215 to -59.55712200274624
Iteration 6 complete. Error: -59.55712200274624 Total: 4.5576; Orientation: 0.8390; Line Search: 2.4669
Adding measurement 475927c6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.208e+03, gradient 6.309e-02, dot -0.053; [b7454c38-9973-434c-8b24-0c868175cea7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.55712200274624, -8.032296316661403, -3.4464777837779117, -0.16343620513125903
LBFGS Accumulation History: 3 points
Removed measurement 475927c6 to history. Total: 3
th(0)=-59.55712200274624;dx=-0.003963335325598726
Armijo: th(45243.12849066957)=-52.77319635862745; dx=2.2487416118359638E-4 evalInputDelta=-6.7839256441187885
New Minimum: -59.55712200274624 > -71.59755214151005
WOLF (strong): th(22621.564245334786)=-71.59755214151005; dx=1.4247686833568555E-4 evalInputDelta=12.04043013876381
New Minimum: -71.59755214151005 > -75.18495423786597
END: th(7540.521415111595)=-75.18495423786597; dx=-9.995931920564693E-4 evalInputDelta=15.627832235119726
Fitness changed from -59.55712200274624 to -75.18495423786597
Iteration 7 complete. Error: -75.18495423786597 Total: 6.3729; Orientation: 0.4613; Line Search: 4.7792
Adding measurement 2cc9581a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.249e+04, gradient 5.083e-02, dot -0.084; [b7454c38-9973-434c-8b24-0c868175cea7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.18495423786597, -8.032296316661403, -3.4464777837779117, -0.16343620513125903
LBFGS Accumulation History: 3 points
Removed measurement 2cc9581a to history. Total: 3
th(0)=-75.18495423786597;dx=-0.0025640141335121812
New Minimum: -75.18495423786597 > -82.2494389940974
END: th(16245.56091764473)=-82.2494389940974; dx=-1.5971595924101946E-4 evalInputDelta=7.064484756231437
Fitness changed from -75.18495423786597 to -82.2494389940974
Iteration 8 complete. Error: -82.2494389940974 Total: 4.0727; Orientation: 0.4507; Line Search: 2.3826
Adding measurement 706b83ae to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.937e+04, gradient 6.915e-02, dot -0.072; [b7454c38-9973-434c-8b24-0c868175cea7 = 1.000/1.000e+00]
Orientation 

...skipping 9280 bytes...

5 evalInputDelta=0.021726862192167573
New Minimum: -132.29059218723756 > -132.37739020504975
WOLFE (weak): th(3.1812866780498637E-6)=-132.37739020504975; dx=-35613.0287707914 evalInputDelta=0.10852488000435301
New Minimum: -132.37739020504975 > -132.90940582310193
WOLFE (weak): th(1.9087720068299182E-5)=-132.90940582310193; dx=-34973.357351072045 evalInputDelta=0.6405404980565379
New Minimum: -132.90940582310193 > -136.3167267799517
END: th(1.3361404047809426E-4)=-136.3167267799517; dx=-30051.706747101107 evalInputDelta=4.047861454906297
Fitness changed from -132.2688653250454 to -136.3167267799517
Iteration 16 complete. Error: -136.3167267799517 Total: 12.9054; Orientation: 1.6570; Line Search: 9.9929
Adding measurement 57b79e1f to history. Total: 4
Accepted: LBFGS Orientation magnitude: 1.376e+06, gradient 5.181e-02, dot 0.262; [b7454c38-9973-434c-8b24-0c868175cea7 = 1.000/1.000e+00]
th(0)=-136.3167267799517;dx=-19636.269686523687
New Minimum: -136.3167267799517 > -140.5257080016856
END: th(2.878627238813306E-4)=-140.5257080016856; dx=-15816.924992066313 evalInputDelta=4.208981221733893
Fitness changed from -136.3167267799517 to -140.5257080016856
Iteration 17 complete. Error: -140.5257080016856 Total: 4.0976; Orientation: 0.5595; Line Search: 2.3824
Adding measurement 4c5391e7 to history. Total: 5
Accepted: LBFGS Orientation magnitude: 1.245e+06, gradient 5.557e-02, dot 0.221; [b7454c38-9973-434c-8b24-0c868175cea7 = 1.000/1.000e+00]
th(0)=-140.5257080016856;dx=-15069.542661082016
New Minimum: -140.5257080016856 > -145.87380167674044
END: th(6.201814382970082E-4)=-145.87380167674044; dx=-10572.22982025883 evalInputDelta=5.348093675054855
Fitness changed from -140.5257080016856 to -145.87380167674044
Iteration 18 complete. Error: -145.87380167674044 Total: 4.3062; Orientation: 0.8296; Line Search: 2.3475
Adding measurement 76137e86 to history. Total: 6
Accepted: LBFGS Orientation magnitude: 9.600e+05, gradient 6.147e-02, dot 0.154; [b7454c38-9973-434c-8b24-0c868175cea7 = 1.000/1.000e+00]
th(0)=-145.87380167674044;dx=-9125.283784749807
New Minimum: -145.87380167674044 > -149.00950971120938
END: th(0.0013361404047809427)=-149.00950971120938; dx=-4696.23697875074 evalInputDelta=3.1357080344689336
Fitness changed from -145.87380167674044 to -149.00950971120938
Iteration 19 complete. Error: -149.00950971120938 Total: 4.3010; Orientation: 0.7796; Line Search: 2.3897
Adding measurement 7e01753f to history. Total: 7
Accepted: LBFGS Orientation magnitude: 6.528e+05, gradient 6.434e-02, dot 0.100; [b7454c38-9973-434c-8b24-0c868175cea7 = 1.000/1.000e+00]
th(0)=-149.00950971120938;dx=-4167.65135652845
Armijo: th(0.002878627238813306)=-147.1131247862508; dx=-1544.076537264843 evalInputDelta=-1.8963849249585678
Armijo: th(0.001439313619406653)=-148.61948712441784; dx=-2128.9702704065107 evalInputDelta=-0.390022586791531
New Minimum: -149.00950971120938 > -149.05731778203645
END: th(4.797712064688843E-4)=-149.05731778203645; dx=-2737.77809157635 evalInputDelta=0.047808070827073834
Fitness changed from -149.00950971120938 to -149.05731778203645
Iteration 20 complete. Error: -149.05731778203645 Total: 6.7734; Orientation: 0.8845; Line Search: 4.7752
<a id="p-17"></a>Iteration 20
<a id="p-16"></a>![Iteration 20](etc/e0e17db7-c459-44ae-9e33-008981e5d79d.jpg)
Adding measurement 33fa6b2e to history. Total: 8
Accepted: LBFGS Orientation magnitude: 6.062e+05, gradient 6.572e-02, dot 0.091; [b7454c38-9973-434c-8b24-0c868175cea7 = 1.000/1.000e+00]
th(0)=-149.05731778203645;dx=-3590.279038055677
Armijo: th(0.0010336357304950136)=-148.61952654976062; dx=-1880.7695429497876 evalInputDelta=-0.4377912322758277
Armijo: th(5.168178652475068E-4)=-148.91066034916707; dx=-2214.5768946992175 evalInputDelta=-0.14665743286937527
Armijo: th(1.7227262174916895E-4)=-149.02601099514473; dx=-2395.118946128662 evalInputDelta=-0.03130678689171873
Armijo: th(4.306815543729224E-5)=-149.05060225054442; dx=-2438.8405213094975 evalInputDelta=-0.006715531492034188
Armijo: th(8.613631087458447E-6)=-149.05611883616183; dx=-2509.4297175204647 evalInputDelta=-0.0011989458746199944
Armijo: th(1.4356051812430744E-6)=-149.05708847619425; dx=-2501.770828885209 evalInputDelta=-2.2930584219693628E-4
Armijo: th(2.0508645446329634E-7)=-149.05726536930362; dx=-2508.9421924146022 evalInputDelta=-5.241273282763359E-5
Armijo: th(2.5635806807912042E-8)=-149.0572981272638; dx=-2496.8437254791615 evalInputDelta=-1.9654772643207252E-5
Armijo: th(2.8484229786568936E-9)=-149.0572981272638; dx=-2446.903545379918 evalInputDelta=-1.9654772643207252E-5
Armijo: th(2.848422978656894E-10)=-149.0572981272638; dx=-2455.2228219192602 evalInputDelta=-1.9654772643207252E-5
MIN ALPHA (2.5894754351426308E-11): th(0.0)=-149.05731778203645
Fitness changed from -149.05731778203645 to -149.05731778203645
Static Iteration Total: 16.8800; Orientation: 0.9972; Line Search: 14.5965
Iteration 21 failed. Error: -149.05731778203645
Previous Error: 0.0 -> -149.05731778203645
Retrying iteration 21
Reset training subject: 5189044507010
Adding measurement 76a81f0e to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-149.05731778203645;dx=-0.004274002557107439
WOLFE (weak): th(2.1544346900318838E-10)=-149.05731778203645; dx=-0.00420858425638968 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-149.05731778203645; dx=-0.004195203054421729 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-149.05731778203645; dx=-0.0041782758646475016 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-149.05731778203645; dx=-0.00421640916760973 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-149.05731778203645; dx=-0.00417882256960457 evalInputDelta=0.0
Armijo: th(1.5511929768229565E-7)=-149.05731123044586; dx=-0.00415219953470353 evalInputDelta=-6.551590587378087E-6
Armijo: th(9.048625698133912E-8)=-149.05731123044586; dx=-0.004175811936538985 evalInputDelta=-6.551590587378087E-6
WOLFE (weak): th(5.816973663086087E-8)=-149.05731778203645; dx=-0.004206672509692046 evalInputDelta=0.0
WOLFE (weak): th(7.432799680609999E-8)=-149.05731778203645; dx=-0.004134451703557357 evalInputDelta=0.0
WOLFE (weak): th(8.240712689371956E-8)=-149.05731778203645; dx=-0.00420991993347652 evalInputDelta=0.0
Armijo: th(8.644669193752934E-8)=-149.05731123044586; dx=-0.004008326654424245 evalInputDelta=-6.551590587378087E-6
WOLFE (weak): th(8.442690941562445E-8)=-149.05731778203645; dx=-0.004220091744025007 evalInputDelta=0.0
WOLFE (weak): th(8.54368006765769E-8)=-149.05731778203645; dx=-0.004216962291880589 evalInputDelta=0.0
Armijo: th(8.594174630705312E-8)=-149.05731123044586; dx=-0.004217243798335069 evalInputDelta=-6.551590587378087E-6
WOLFE (weak): th(8.568927349181501E-8)=-149.05731778203645; dx=-0.004186541947241388 evalInputDelta=0.0
WOLFE (weak): th(8.581550989943406E-8)=-149.05731778203645; dx=-0.004191610795802778 evalInputDelta=0.0
WOLFE (weak): th(8.587862810324359E-8)=-149.05731778203645; dx=-0.004216941601769873 evalInputDelta=0.0
Armijo: th(8.591018720514836E-8)=-149.05731123044586; dx=-0.0041750217453836985 evalInputDelta=-6.551590587378087E-6
Armijo: th(8.589440765419598E-8)=-149.05731123044586; dx=-0.0042148657544976206 evalInputDelta=-6.551590587378087E-6
Armijo: th(8.588651787871979E-8)=-149.05730467885496; dx=-0.004195675994034177 evalInputDelta=-1.3103181487394977E-5
WOLFE (weak): th(8.588257299098168E-8)=-149.05731778203645; dx=-0.004102014020742038 evalInputDelta=0.0
WOLFE (weak): th(8.588454543485074E-8)=-149.05731778203645; dx=-0.0042191455314383 evalInputDelta=0.0
Armijo: th(8.588553165678527E-8)=-149.05730467885496; dx=-0.004128336749720789 evalInputDelta=-1.3103181487394977E-5
Armijo: th(8.588503854581801E-8)=-149.05730467885496; dx=-0.004183387051763172 evalInputDelta=-1.3103181487394977E-5
mu ~= nu (8.588454543485074E-8): th(0.0)=-149.05731778203645
Fitness changed from -149.05731778203645 to -149.05731778203645
Static Iteration Total: 33.2198; Orientation: 0.0170; Line Search: 30.9590
Iteration 22 failed. Error: -149.05731778203645
Previous Error: 0.0 -> -149.05731778203645
Optimization terminated 22
Final threshold in iteration 22: -149.05731778203645 (> -Infinity) after 186.864s (< 3600.000s)

Returns

    -149.05731778203645