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 64.24 seconds (1.420 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: 143805008182100
Reset training subject: 143805981852400
Adding measurement 186c97d7 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-6.329653187859167;dx=-1.8839441951664E-5
New Minimum: -6.329653187859167 > -6.329696194954494
WOLFE (weak): th(2.154434690031884)=-6.329696194954494; dx=-1.8036763730784243E-5 evalInputDelta=4.3007095326785816E-5
New Minimum: -6.329696194954494 > -6.329737814445942
WOLFE (weak): th(4.308869380063768)=-6.329737814445942; dx=-1.8025171560152174E-5 evalInputDelta=8.462658677554913E-5
New Minimum: -6.329737814445942 > -6.3299077578626175
WOLFE (weak): th(12.926608140191302)=-6.3299077578626175; dx=-1.7996873983762588E-5 evalInputDelta=2.545700034506382E-4
New Minimum: -6.3299077578626175 > -6.330672793559184
WOLFE (weak): th(51.70643256076521)=-6.330672793559184; dx=-1.7900601855994175E-5 evalInputDelta=0.0010196057000175784
New Minimum: -6.330672793559184 > -6.334751308026987
WOLFE (weak): th(258.53216280382605)=-6.334751308026987; dx=-1.8044008496186345E-5 evalInputDelta=0.005098120167819964
New Minimum: -6.334751308026987 > -6.36022341244903
WOLFE (weak): th(1551.1929768229563)=-6.36022341244903; dx=-1.795502249084534E-5 evalInputDelta=0.030570224589863138
New Minimum: -6.36022341244903 > -6.544414808675721
WOLFE (weak): th(10858.350837760694)=-6.544414808675721; dx=-1.817277806508417E-5 evalInputDelta=0.21476162081655392
New Minimum: -6.544414808675721 > -8.046451387539962
WOLFE (weak): th(86866.80670208555)=-8.046451387539962; dx=-1.7965497790429735E-5 evalInputDelta=1.7167981996807953
New Minimum: -8.046451387539962 > -16.762568323050743
END: th(781801.26031877)=-16.762568323050743; dx=-6.770895119919329E-6 evalInputDelta=10.432915135191577
Fitness changed from -6.329653187859167 to -16.762568323050743
Iteration 1 complete. Error: -16.762568323050743 Total: 12.0275; Orientation: 0.0143; Line Search: 8.7033
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a5bcc755-8dd0-444b-bc37-ecefb0e939e0.jpg)
Adding measurement 1c8d137a to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-16.762568323050743;dx=-3.579630520342624E-5
New Minimum: -16.762568323050743 > -28.012002408413146
WOLF (strong): th(1684339.7559414052)=-28.012002408413146; dx=9.674003376940266E-8 evalInputDelta=11.249434085362402
New Minimum: -28.012002408413146 > -30.606924887497886
END: th(842169.8779707026)=-30.606924887497886; dx=-5.201721030410492E-6 evalInputDelta=13.844356564447143
Fitness changed from -16.762568323050743 to -30.606924887497886
Iteration 2 complete. Error: -30.606924887497886 Total: 3.7852; Orientation: 0.0150; Line Search: 2.5933
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/5bb2d817-54e7-4c89-858a-174570e97623.jpg)
Adding measurement 38d8f6fd to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-30.606924887497886;dx=-5.137963068721785E-5
New Minimum: -30.606924887497886 > -35.16370916180916
WOLF (strong): th(1814400.0)=-35.16370916180916; dx=2.6109202039489323E-6 evalInputDelta=4.556784274311273
New Minimum: -35.16370916180916 > -43.142992836155635
END: th(907200.0)=-43.142992836155635; dx=-1.950211866950771E-6 evalInputDelta=12.536067948657749
Fitness changed from -30.606924887497886 to -43.142992836155635
Iteration 3 complete. Error: -43.142992836155635 Total: 3.5055; Orientation: 0.0147; Line Search: 2.5845
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c58922f2-9dc1-4181-8792-4a7d824cd81a.jpg)
Adding measurement 2e7c4853 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.700e+04, gradient 7.625e-03, dot -0.230; [bc12e1b6-da20-4ca6-a733-35353cd376d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -43.142992836155635, -30.606924887497886, -16.762568323050743, -6.329653187859167
LBFGS Accumulation History: 3 points
Removed measurement 2e7c4853 to history. Total: 3
th(0)=-43.142992836155635;dx=-5.799747756423655E-5
Armijo: th(1954503.150796925)=-42.486658114799845; dx=5.187035512412125E-6 evalInputDelta=-0.6563347213557904
New Minimum: -43.142992836155635 > -55.89576086923985
WOLF (strong): th(977251.5753984625)=-55.89576086923985; dx=1.9188754382659484E-6 evalInputDelta=12.752768033084216
New Minimum: -55.89576086923985 > -56.335175306250555
END: th(325750.5251328208)=-56.335175306250555; dx=-1.8755431519208047E-5 evalInputDelta=13.19218247009492
Fitness changed from -43.142992836155635 to -56.335175306250555
Iteration 4 complete. Error: -56.335175306250555 Total: 4.7443; Orientation: 0.2999; Line Search: 3.5387
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/70011871-81e0-45fc-be7d-cd5bfc84b80b.jpg)
Adding measurement 15f47e7a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.370e+04, gradient 6.246e-03, dot -0.270; [bc12e1b6-da20-4ca6-a733-35353cd376d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -56.335175306250555, -30.606924887497886, -16.762568323050743, -6.329653187859167
LBFGS Accumulation History: 3 points
Removed measurement 15f47e7a to history. Total: 3
th(0)=-56.335175306250555;dx=-3.86555323438988E-5
New Minimum: -56.335175306250555 > -67.52825585637908
END: th(701808.2316422522)=-67.52825585637908; dx=-7.842619536278213E-6 evalInputDelta=11.19308055012852
Fitness changed from -56.335175306250555 to -67.52825585637908
Iteration 5 complete. Error: -67.52825585637908 Total: 2.9645; Orientation: 0.2854; Line Search: 1.7321
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8683f881-02f7-4d4c-a91a-245c823eccda.jpg)
Adding measurement 3406ff46 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.054e+04, gradient 7.172e-03, dot -0.260; [bc12e1b6-da20-4ca6-a733-35353cd376d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.52825585637908, -30.606924887497886, -16.762568323050743, -6.329653187859167
LBFGS Accumulation History: 3 points
Removed measurement 3406ff46 to history. Total: 3
th(0)=-67.52825585637908;dx=-5.139861486188687E-5
Armijo: th(1512000.0)=-65.44584987428043; dx=4.304975316749191E-6 evalInputDelta=-2.082405982098649
New Minimum: -67.52825585637908 > -73.77968347065477
WOLF (strong): th(756000.0)=-73.77968347065477; dx=1.129554702209103E-6 evalInputDelta=6.251427614275698
New Minimum: -73.77968347065477 > -75.10379070702174
END: th(252000.0)=-75.10379070702174; dx=-1.4479143871042448E-5 evalInputDelta=7.5755348506426685
Fitness changed from -67.52825585637908 to -75.10379070702174
Iteration 6 complete. Error: -75.10379070702174 Total: 4.7186; Orientation: 0.2877; Line Search: 3.4523
Adding measurement 5971b1c4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.611e+04, gradient 5.679e-03, dot -0.314; [bc12e1b6-da20-4ca6-a733-35353cd376d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.10379070702174, -30.606924887497886, -16.762568323050743, -6.329653187859167
LBFGS Accumulation History: 3 points
Removed measurement 5971b1c4 to history. Total: 3
th(0)=-75.10379070702174;dx=-3.211510454021729E-5
New Minimum: -75.10379070702174 > -82.4793856287091
END: th(542917.5418880347)=-82.4793856287091; dx=-1.001695971643566E-5 evalInputDelta=7.375594921687352
Fitness changed from -75.10379070702174 to -82.4793856287091
Iteration 7 complete. Error: -82.4793856287091 Total: 3.0370; Orientation: 0.2712; Line Search: 1.7934
Adding measurement 28cf2cf6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.273e+04, gradient 6.273e-03, dot -0.305; [bc12e1b6-da20-4ca6-a733-35353cd376d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -82.4793856287091, -30.606924887497886, -16.762568323050743, -6.329653187859167
LBFGS Accumulation History: 3 points
Removed measurement 28cf2cf6 to history. Total: 3
th(0)=-82.4793856287091;dx=-3.906035328266043E-5
New Minimum: -82.4793856287091 > -83.45300466253629
WOLF (strong): th(1169680.3860704203)=-83.45300466253629; dx=1.2385753705774038E-6 evalInputDelta=0.9736190338271911
New Minimum: -83.45300466253629 > -87.4009640404238
END: th(584840.1930352101)=-87.4009640404238; dx=-2.1856605806642537E-6 evalInputDelta=4.921578411714705
Fitness changed from -82.4793856287091 to -87.4009640404238
Iteration 8 complete. Error: -87.4009640404238 Total: 3.7238; Orientation: 0.3086; Line Search: 2.5980
Adding measurement 6acfb55d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.866e+04, gradient 6.854e-03, dot -0.276; [bc12e1b6-da20-4ca6-a733-35353cd376d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.4009640404238, -30.606924887497886, -16.762568323050743, -6.329653187859167
LBFGS Accumulation History: 3 points
Removed measurement 6acfb55d to history. Total: 3
th(0)=-87.4009640404238;dx=-4.6897672663830116E-5
Armijo: th(1260000.0)=-80.83397246707838; dx=7.791718989322507E-6 evalInputDelta=-6.566991573345419
New Minimum: -87.4009640404238 > -91.75133122804323
WOLF (strong): th(630000.0)=-91.75133122804323; dx=5.63271376829886E-6 evalInputDelta=4.350367187619426
New Minimum: -91.75133122804323 > -93.68635224103545
END: th(210000.0)=-93.68635224103545; dx=-1.680729872266438E-5 evalInputDelta=6.285388200611649
Fitness changed from -87.4009640404238 to -93.68635224103545
Iteration 9 complete. Error: -93.68635224103545 Total: 4.7930; Orientation: 0.2775; Line Search: 3.6727
Adding measurement 3a53e41c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.346e+05, gradient 5.370e-03, dot -0.377; [bc12e1b6-da20-4ca6-a733-35353cd376d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -93.68635224103545, -30.606924887497886, -16.762568323050743, -6.329653187859167
LBFGS Accumulation History: 3 points
Removed measurement 3a53e41c to history. Total: 3
th(0)=-93.68635224103545;dx=-2.8785182869826452E-5
New Minimum: -93.68635224103545 > -99.30636174773177
END: th(452431.2849066956)=-99.30636174773177; dx=-1.0694030252532785E-5 evalInputDelta=5.62000950669632
Fitness changed from -93.68635224103545 to -99.30636174773177
Iteration 10 complete. Error: -99.30636174773177 Total: 2.8834; Orientation: 0.2884; Line Search: 1.7343
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/dbe07efe-6d47-4843-8cce-b1bd3782a5cc.jpg)
Adding measurement 27248014 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.687e+05, gradient 5.581e-03, dot -0.360; [bc12e1b6-da20-4ca6-a733-35353cd376d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -99.30636174773177, -30.606924887497886, -16.762568323050743, -6.329653187859167
LBFGS Accumulation History: 3 points
Removed measurement 27248014 to history. Total: 3
th(0)=-99.30636174773177;dx=-3.108142252108101E-5
New Minimum: -99.30636174773177 > -102.67671787358526
END: th(974733.6550586836)=-102.67671787358526; dx=-3.531439901388654E-6 evalInputDelta=3.3703561258534904
Fitness changed from -99.30636174773177 to -102.67671787358526
Iteration 11 complete. Error: -102.67671787358526 Total: 3.0587; Orientation: 0.2979; Line Search: 1.8268
Adding measurement 16a84859 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.240e+05, gradient 6.969e-03, dot -0.301; [bc12e1b6-da20-4ca6-a733-35353cd376d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -102.67671787358526, -30.606924887497886, -16.762568323050743, -6.329653187859167
LBFGS Accumulation History: 3 points
Removed measurement 16a84859 to history. Total: 3
th(0)=-102.67671787358526;dx=-4.8336239374814085E-5
Armijo: th(2100000.0)=-83.38332858803163; dx=8.542704757037987E-6 evalInputDelta=-19.29338928555363
New Minimum: -102.67671787358526 > -102.88545784408839
WOLF (strong): th(1050000.0)=-102.88545784408839; dx=8.467257879958233E-6 evalInputDelta=0.20873997050313164
New Minimum: -102.88545784408839 > -111.21030802068948
END: th(350000.0)=-111.21030802068948; dx=-8.566151514243296E-6 evalInputDelta=8.53359014710422
Fitness changed from -102.67671787358526 to -111.21030802068948
Iteration 12 complete. Error: -111.21030802068948 Total: 4.6650; Orientation: 0.3018; Line Search: 3.5552
Adding measurement e55be9c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.372e+05, gradient 5.533e-03, dot -0.387; [bc12e1b6-da20-4ca6-a733-35353cd376d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -111.21030802068948, -30.606924887497886, -16.762568323050743, -6.329653187859167
LBFGS Accumulation History: 3 points
Removed measurement e55be9c to history. Total: 3
th(0)=-111.21030802068948;dx=-3.047917748403002E-5
New Minimum: -111.21030802068948 > -116.43412730778162
END: th(754052.1415111594)=-116.43412730778162; dx=-4.318307067118565E-6 evalInputDelta=5.223819287092141
Fitness changed from -111.21030802068948 to -116.43412730778162
Iteration 13 complete. Error: -116.43412730778162 Total: 2.8212; Orientation: 0.2764; Line Search: 1.7250
Adding measurement 4f43607a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.557e+05, gradient 6.412e-03, dot -0.328; [bc12e1b6-da20-4ca6-a733-35353cd376d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -116.43412730778162, -30.606924887497886, -16.762568323050743, -6.329653187859167
LBFGS Accumulation History: 3 points
Removed measurement 4f43607a to history. Total: 3
th(0)=-116.43412730778162;dx=-4.089004404002151E-5
Armijo: th(1624556.091764473)=-105.55137434981044; dx=6.761026982613158E-6 evalInputDelta=-10.882752957971178
New Minimum: -116.43412730778162 > -117.52155256205336
WOLF (strong): th(812278.0458822364)=-117.52155256205336; dx=4.356597235495035E-6 evalInputDelta=1.0874252542717358
New Minimum: -117.52155256205336 > -121.5404365686948
END: th(270759.34862741217)=-121.5404365686948; dx=-9.276100768390743E-6 evalInputDelta=5.106309260913179
Fitness changed from -116.43412730778162 to -121.5404365686948
Iteration 14 complete. Error: -121.5404365686948 Total: 4.4804; Orientation: 0.2757; Line Search: 3.4108
Adding measurement 1ba56313 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.494e+06, gradient 5.219e-03, dot -0.414; [bc12e1b6-da20-4ca6-a733-35353cd376d0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -121.5404365686948, -30.606924887497886, -16.762568323050743, -6.329653187859167
LBFGS Accumulation History: 3 points
Removed measurement 1ba56313 to history. Total: 3
th(0)=-121.5404365686948;dx=-2.7109293698380124E-5
New Minimum: -121.5404365686948 > -125.85963291909009
END: th(583333.3333333335)=-125.85963291909009; dx=-7.501505293256907E-6 evalInputDelta=4.319196350395288
Fitness changed from -121.5404365686948 to -125.85963291909009
Iteration 15 complete. Error: -125.85963291909009 Total: 2.9252; Orientation: 0.2773; Line Search: 1.8260
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/77661e25-50c7-4e87-9687-dc2ad2a0e50f.jpg)
Final threshold in iteration 16: -125.85963291909009 (> -Infinity) after 64.242s (< 5400.000s)

Returns

    -125.85963291909009