Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

BasicOptimizer.scala:89 executed in 333.98 seconds (4.213 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: 577334637773200
Reset training subject: 577340795842400
Adding measurement 2231609e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-39.8820366808295;dx=-2.4814755147376566E-6
New Minimum: -39.8820366808295 > -39.88204236212748
WOLFE (weak): th(2.154434690031884)=-39.88204236212748; dx=-2.4749521634555125E-6 evalInputDelta=5.681297977844224E-6
New Minimum: -39.88204236212748 > -39.88204993719019
WOLFE (weak): th(4.308869380063768)=-39.88204993719019; dx=-2.474906545029666E-6 evalInputDelta=1.3256360688274071E-5
New Minimum: -39.88204993719019 > -39.882072662369694
WOLFE (weak): th(12.926608140191302)=-39.882072662369694; dx=-2.474585833434738E-6 evalInputDelta=3.59815401935748E-5
New Minimum: -39.882072662369694 > -39.88217871303617
WOLFE (weak): th(51.70643256076521)=-39.88217871303617; dx=-2.474727287245535E-6 evalInputDelta=1.4203220666786365E-4
New Minimum: -39.88217871303617 > -39.88273926187437
WOLFE (weak): th(258.53216280382605)=-39.88273926187437; dx=-2.475214885201635E-6 evalInputDelta=7.025810448695324E-4
New Minimum: -39.88273926187437 > -39.88624251363222
WOLFE (weak): th(1551.1929768229563)=-39.88624251363222; dx=-2.474688360638705E-6 evalInputDelta=0.004205832802718135
New Minimum: -39.88624251363222 > -39.911460633629964
WOLFE (weak): th(10858.350837760694)=-39.911460633629964; dx=-2.473726495922584E-6 evalInputDelta=0.029423952800463837
New Minimum: -39.911460633629964 > -40.116814620912315
WOLFE (weak): th(86866.80670208555)=-40.116814620912315; dx=-2.460463711640633E-6 evalInputDelta=0.2347779400828145
New Minimum: -40.116814620912315 > -41.94109183908791
WOLFE (weak): th(781801.26031877)=-41.94109183908791; dx=-2.332041143843277E-6 evalInputDelta=2.05905515825841
New Minimum: -41.94109183908791 > -53.59585920050172
END: th(7818012.6031877)=-53.59585920050172; dx=-7.387811595746641E-7 evalInputDelta=13.71382251967222
Fitness changed from -39.8820366808295 to -53.59585920050172
Iteration 1 complete. Error: -53.59585920050172 Total: 88.8477; Orientation: 0.1463; Line Search: 70.6764
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5cb26e78-2313-43b5-9b4a-ad0136f5528c.jpg)
Adding measurement 7a8dba32 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-53.59585920050172;dx=-1.2942462077140096E-6
New Minimum: -53.59585920050172 > -62.836336027027045
END: th(1.684339755941405E7)=-62.836336027027045; dx=-4.504751581117573E-8 evalInputDelta=9.240476826525324
Fitness changed from -53.59585920050172 to -62.836336027027045
Iteration 2 complete. Error: -62.836336027027045 Total: 20.4815; Orientation: 0.1489; Line Search: 13.1120
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/7b41edd5-74ce-4977-83a6-9eacf0df53dc.jpg)
Adding measurement 7b1af7a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-62.836336027027045;dx=-1.4634149394144413E-6
Armijo: th(3.6288E7)=-59.28115346678039; dx=4.2224181393686726E-7 evalInputDelta=-3.5551825602466565
New Minimum: -62.836336027027045 > -69.18692806208733
WOLF (strong): th(1.8144E7)=-69.18692806208733; dx=4.224397615863468E-7 evalInputDelta=6.350592035060288
New Minimum: -69.18692806208733 > -69.99497933673979
END: th(6048000.0)=-69.99497933673979; dx=-6.468245242474385E-7 evalInputDelta=7.158643309712744
Fitness changed from -62.836336027027045 to -69.99497933673979
Iteration 3 complete. Error: -69.99497933673979 Total: 31.5545; Orientation: 0.1497; Line Search: 24.1345
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/abd0d9bd-d7f1-4f72-94d5-a22c018bf7d5.jpg)
Adding measurement 15c4055 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.260e+04, gradient 8.124e-04, dot -0.763; [39b28a1b-78e6-4a47-a87c-507214c56d15 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.99497933673979, -62.836336027027045, -53.59585920050172, -39.8820366808295
LBFGS Accumulation History: 3 points
Removed measurement 15c4055 to history. Total: 3
th(0)=-69.99497933673979;dx=-6.588735225357631E-7
New Minimum: -69.99497933673979 > -75.87580480322535
END: th(1.3030021005312834E7)=-75.87580480322535; dx=-2.213269618326689E-7 evalInputDelta=5.880825466485561
Fitness changed from -69.99497933673979 to -75.87580480322535
Iteration 4 complete. Error: -75.87580480322535 Total: 22.0346; Orientation: 2.6630; Line Search: 12.0812
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d7b46e83-1ce0-4223-a2be-641bc329bc5d.jpg)
Adding measurement 43b83f44 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.634e+04, gradient 8.196e-04, dot -0.686; [39b28a1b-78e6-4a47-a87c-507214c56d15 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.87580480322535, -62.836336027027045, -53.59585920050172, -39.8820366808295
LBFGS Accumulation History: 3 points
Removed measurement 43b83f44 to history. Total: 3
th(0)=-75.87580480322535;dx=-6.717467844222602E-7
New Minimum: -75.87580480322535 > -78.97504951264845
WOLF (strong): th(2.8072329265690092E7)=-78.97504951264845; dx=1.1708932956223527E-7 evalInputDelta=3.099244709423104
New Minimum: -78.97504951264845 > -80.20970053636884
END: th(1.4036164632845046E7)=-80.20970053636884; dx=-2.7959661904861013E-8 evalInputDelta=4.333895733143493
Fitness changed from -75.87580480322535 to -80.20970053636884
Iteration 5 complete. Error: -80.20970053636884 Total: 28.0347; Orientation: 2.5534; Line Search: 18.3306
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/334b37ff-8734-453d-8c08-12cf8a05971c.jpg)
Adding measurement 21aca83a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.645e+04, gradient 8.950e-04, dot -0.583; [39b28a1b-78e6-4a47-a87c-507214c56d15 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.20970053636884, -62.836336027027045, -53.59585920050172, -39.8820366808295
LBFGS Accumulation History: 3 points
Removed measurement 21aca83a to history. Total: 3
th(0)=-80.20970053636884;dx=-7.996144806965011E-7
Armijo: th(3.0240000000000007E7)=-79.32019698577268; dx=3.1904616751105967E-7 evalInputDelta=-0.8895035505961602
New Minimum: -80.20970053636884 > -84.26921057604108
WOLF (strong): th(1.5120000000000004E7)=-84.26921057604108; dx=1.69569918429465E-7 evalInputDelta=4.059510039672233
END: th(5040000.000000001)=-83.61974686858755; dx=-4.326515630377444E-7 evalInputDelta=3.4100463322187125
Fitness changed from -80.20970053636884 to -84.26921057604108
Iteration 6 complete. Error: -84.26921057604108 Total: 34.0961; Orientation: 2.6081; Line Search: 24.2283
Adding measurement 32711e33 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.894e+04, gradient 9.544e-04, dot -0.509; [39b28a1b-78e6-4a47-a87c-507214c56d15 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.26921057604108, -62.836336027027045, -53.59585920050172, -39.8820366808295
LBFGS Accumulation History: 3 points
Removed measurement 32711e33 to history. Total: 3
th(0)=-84.26921057604108;dx=-9.094077443544461E-7
New Minimum: -84.26921057604108 > -89.44570385448087
WOLF (strong): th(1.0858350837760696E7)=-89.44570385448087; dx=4.055760017632362E-8 evalInputDelta=5.176493278439793
END: th(5429175.418880348)=-88.37648698099039; dx=-4.5276720858909504E-7 evalInputDelta=4.107276404949317
Fitness changed from -84.26921057604108 to -89.44570385448087
Iteration 7 complete. Error: -89.44570385448087 Total: 27.4313; Orientation: 2.5422; Line Search: 18.7560
Adding measurement 6b289ec1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.932e+04, gradient 7.126e-04, dot -0.625; [39b28a1b-78e6-4a47-a87c-507214c56d15 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -89.44570385448087, -62.836336027027045, -53.59585920050172, -39.8820366808295
LBFGS Accumulation History: 3 points
Removed measurement 6b289ec1 to history. Total: 3
th(0)=-89.44570385448087;dx=-5.076045823654363E-7
New Minimum: -89.44570385448087 > -92.7975845105637
END: th(1.1696803860704206E7)=-92.7975845105637; dx=-5.8841565317808134E-8 evalInputDelta=3.3518806560828267
Fitness changed from -89.44570385448087 to -92.7975845105637
Iteration 8 complete. Error: -92.7975845105637 Total: 21.3169; Orientation: 2.5545; Line Search: 12.6051
Adding measurement 1a240715 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.029e+04, gradient 6.822e-04, dot -0.618; [39b28a1b-78e6-4a47-a87c-507214c56d15 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -92.7975845105637, -62.836336027027045, -53.59585920050172, -39.8820366808295
LBFGS Accumulation History: 3 points
Removed measurement 1a240715 to history. Total: 3
th(0)=-92.7975845105637;dx=-4.642119138088551E-7
New Minimum: -92.7975845105637 > -94.6009028453374
WOLF (strong): th(2.5200000000000007E7)=-94.6009028453374; dx=1.3156656519846245E-7 evalInputDelta=1.8033183347737065
New Minimum: -94.6009028453374 > -95.78539815431488
END: th(1.2600000000000004E7)=-95.78539815431488; dx=-2.653726731022443E-8 evalInputDelta=2.9878136437511813
Fitness changed from -92.7975845105637 to -95.78539815431488
Iteration 9 complete. Error: -95.78539815431488 Total: 26.6519; Orientation: 2.4910; Line Search: 18.2892
Adding measurement 2bef2220 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.911e+04, gradient 6.924e-04, dot -0.587; [39b28a1b-78e6-4a47-a87c-507214c56d15 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.78539815431488, -62.836336027027045, -53.59585920050172, -39.8820366808295
LBFGS Accumulation History: 3 points
Removed measurement 2bef2220 to history. Total: 3
th(0)=-95.78539815431488;dx=-4.778465736008614E-7
New Minimum: -95.78539815431488 > -96.48383884784924
WOLF (strong): th(2.7145877094401743E7)=-96.48383884784924; dx=1.8919352998976812E-7 evalInputDelta=0.6984406935343657
New Minimum: -96.48383884784924 > -98.65589927348566
WOLF (strong): th(1.3572938547200872E7)=-98.65589927348566; dx=2.8801971446258775E-8 evalInputDelta=2.8705011191707825
END: th(4524312.849066957)=-97.66047234470025; dx=-2.9206234930342825E-7 evalInputDelta=1.8750741903853765
Fitness changed from -95.78539815431488 to -98.65589927348566
Iteration 10 complete. Error: -98.65589927348566 Total: 32.2398; Orientation: 2.5400; Line Search: 23.9270
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/af126742-5a74-48c8-8d30-1b0db42fefa3.jpg)
Final threshold in iteration 11: -98.65589927348566 (> -Infinity) after 333.979s (< 5400.000s)

Returns

    -98.65589927348566