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 43.79 seconds (0.830 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: 223175297864700
Reset training subject: 223175937041200
Adding measurement 7ba05c7f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-138.30474729740843;dx=-0.024341844826006223
New Minimum: -138.30474729740843 > -138.34621699413714
WOLFE (weak): th(2.154434690031884)=-138.34621699413714; dx=-0.024412996458124194 evalInputDelta=0.04146969672871137
New Minimum: -138.34621699413714 > -138.3874694414348
WOLFE (weak): th(4.308869380063768)=-138.3874694414348; dx=-0.024438446272264942 evalInputDelta=0.08272214402637701
New Minimum: -138.3874694414348 > -138.5512621639808
WOLFE (weak): th(12.926608140191302)=-138.5512621639808; dx=-0.02419515271546966 evalInputDelta=0.24651486657236887
New Minimum: -138.5512621639808 > -139.2579392768836
WOLFE (weak): th(51.70643256076521)=-139.2579392768836; dx=-0.023987574005727284 evalInputDelta=0.9531919794751786
New Minimum: -139.2579392768836 > -142.1482850498263
END: th(258.53216280382605)=-142.1482850498263; dx=-0.02125830630480766 evalInputDelta=3.8435377524178875
Fitness changed from -138.30474729740843 to -142.1482850498263
Iteration 1 complete. Error: -142.1482850498263 Total: 5.4994; Orientation: 0.0167; Line Search: 3.6891
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8ea82957-bd52-43ad-9411-a63623aa49d9.jpg)
Adding measurement 7389b65 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-142.1482850498263;dx=-0.02414339764978143
New Minimum: -142.1482850498263 > -148.35280505348211
END: th(556.9906600335335)=-148.35280505348211; dx=-0.019033409839118776 evalInputDelta=6.2045200036558015
Fitness changed from -142.1482850498263 to -148.35280505348211
Iteration 2 complete. Error: -148.35280505348211 Total: 2.0205; Orientation: 0.0151; Line Search: 1.2353
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ee1e0c6e-e6d2-402e-a369-4979296334a1.jpg)
Adding measurement 68b7ce51 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-148.35280505348211;dx=-0.024786530957643663
New Minimum: -148.35280505348211 > -163.7265532987162
END: th(1200.0)=-163.7265532987162; dx=-0.019259962079795558 evalInputDelta=15.373748245234083
Fitness changed from -148.35280505348211 to -163.7265532987162
Iteration 3 complete. Error: -163.7265532987162 Total: 1.8312; Orientation: 0.0162; Line Search: 1.2358
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/41ee6ae5-88b4-4db6-a0fc-6da112f333b6.jpg)
Adding measurement 25d82363 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.890e+03, gradient 1.683e-01, dot -0.735; [b2eda548-4e33-467f-8600-0bf691696280 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -163.7265532987162, -148.35280505348211, -142.1482850498263, -138.30474729740843
LBFGS Accumulation History: 3 points
Removed measurement 25d82363 to history. Total: 3
th(0)=-163.7265532987162;dx=-0.028164813034822662
New Minimum: -163.7265532987162 > -201.71551993004294
END: th(2585.3216280382608)=-201.71551993004294; dx=-0.019423845417293646 evalInputDelta=37.98896663132675
Fitness changed from -163.7265532987162 to -201.71551993004294
Iteration 4 complete. Error: -201.71551993004294 Total: 2.1291; Orientation: 0.3083; Line Search: 1.2069
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e25acd26-55b2-482d-af46-e76b64b4b5b0.jpg)
Adding measurement 31a85fca to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.432e+04, gradient 2.014e-01, dot -0.542; [b2eda548-4e33-467f-8600-0bf691696280 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -201.71551993004294, -148.35280505348211, -142.1482850498263, -138.30474729740843
LBFGS Accumulation History: 3 points
Removed measurement 31a85fca to history. Total: 3
th(0)=-201.71551993004294;dx=-0.04034628818729068
New Minimum: -201.71551993004294 > -268.527489406472
END: th(5569.9066003353355)=-268.527489406472; dx=-0.013583784912975369 evalInputDelta=66.81196947642906
Fitness changed from -201.71551993004294 to -268.527489406472
Iteration 5 complete. Error: -268.527489406472 Total: 2.0972; Orientation: 0.3027; Line Search: 1.2156
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f72d7eb6-7d69-49e6-9991-57114079f1fb.jpg)
Adding measurement 2e2445fe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.135e+04, gradient 1.951e-01, dot -0.351; [b2eda548-4e33-467f-8600-0bf691696280 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -268.527489406472, -148.35280505348211, -142.1482850498263, -138.30474729740843
LBFGS Accumulation History: 3 points
Removed measurement 2e2445fe to history. Total: 3
th(0)=-268.527489406472;dx=-0.03786440199704962
New Minimum: -268.527489406472 > -351.62903641365403
END: th(12000.000000000002)=-351.62903641365403; dx=-0.007487779767621768 evalInputDelta=83.10154700718203
Fitness changed from -268.527489406472 to -351.62903641365403
Iteration 6 complete. Error: -351.62903641365403 Total: 2.1336; Orientation: 0.3048; Line Search: 1.2111
Adding measurement 22a55299 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.812e+03, gradient 1.995e-01, dot -0.212; [b2eda548-4e33-467f-8600-0bf691696280 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -351.62903641365403, -148.35280505348211, -142.1482850498263, -138.30474729740843
LBFGS Accumulation History: 3 points
Removed measurement 22a55299 to history. Total: 3
th(0)=-351.62903641365403;dx=-0.039668753196029916
New Minimum: -351.62903641365403 > -377.5696020430224
END: th(25853.21628038261)=-377.5696020430224; dx=-0.0030290865127774818 evalInputDelta=25.940565629368393
Fitness changed from -351.62903641365403 to -377.5696020430224
Iteration 7 complete. Error: -377.5696020430224 Total: 2.3846; Orientation: 0.2977; Line Search: 1.5188
Adding measurement 2d6c6a07 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.283e+03, gradient 1.929e-01, dot -0.128; [b2eda548-4e33-467f-8600-0bf691696280 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -377.5696020430224, -148.35280505348211, -142.1482850498263, -138.30474729740843
LBFGS Accumulation History: 3 points
Removed measurement 2d6c6a07 to history. Total: 3
th(0)=-377.5696020430224;dx=-0.03708918290501127
Armijo: th(55699.066003353364)=-372.99789997983686; dx=-7.984816479610771E-4 evalInputDelta=-4.571702063185569
New Minimum: -377.5696020430224 > -508.7927290954982
END: th(27849.533001676682)=-508.7927290954982; dx=-0.004782174697400594 evalInputDelta=131.22312705247577
Fitness changed from -377.5696020430224 to -508.7927290954982
Iteration 8 complete. Error: -508.7927290954982 Total: 2.6640; Orientation: 0.3006; Line Search: 1.8078
Adding measurement 76f70d35 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.521e+04, gradient 1.799e-01, dot -0.147; [b2eda548-4e33-467f-8600-0bf691696280 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -508.7927290954982, -148.35280505348211, -142.1482850498263, -138.30474729740843
LBFGS Accumulation History: 3 points
Removed measurement 76f70d35 to history. Total: 3
th(0)=-508.7927290954982;dx=-0.032318827004482006
New Minimum: -508.7927290954982 > -510.28959317452234
END: th(60000.00000000002)=-510.28959317452234; dx=-7.417080284790616E-4 evalInputDelta=1.4968640790241352
Fitness changed from -508.7927290954982 to -510.28959317452234
Iteration 9 complete. Error: -510.28959317452234 Total: 2.1334; Orientation: 0.3240; Line Search: 1.2554
Adding measurement 282c15e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.751e+04, gradient 1.627e-01, dot -0.109; [b2eda548-4e33-467f-8600-0bf691696280 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -510.28959317452234, -148.35280505348211, -142.1482850498263, -138.30474729740843
LBFGS Accumulation History: 3 points
Removed measurement 282c15e to history. Total: 3
th(0)=-510.28959317452234;dx=-0.026376098493330266
Armijo: th(129266.08140191308)=-414.5435923531735; dx=2.474697569019865E-4 evalInputDelta=-95.74600082134884
New Minimum: -510.28959317452234 > -696.1946865172325
END: th(64633.04070095654)=-696.1946865172325; dx=-0.002438677272364958 evalInputDelta=185.9050933427102
Fitness changed from -510.28959317452234 to -696.1946865172325
Iteration 10 complete. Error: -696.1946865172325 Total: 2.7254; Orientation: 0.3128; Line Search: 1.8320
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/185280b7-a9c7-460d-9a54-fe1a554f322b.jpg)
Adding measurement 3e65c4ca to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.630e+04, gradient 1.507e-01, dot -0.135; [b2eda548-4e33-467f-8600-0bf691696280 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -696.1946865172325, -148.35280505348211, -142.1482850498263, -138.30474729740843
LBFGS Accumulation History: 3 points
Removed measurement 3e65c4ca to history. Total: 3
th(0)=-696.1946865172325;dx=-0.022600959807180316
Armijo: th(139247.66500838342)=-613.2103799293959; dx=1.1968871547250406E-4 evalInputDelta=-82.98430658783661
New Minimum: -696.1946865172325 > -912.1700988689363
END: th(69623.83250419171)=-912.1700988689363; dx=-0.002975701661393811 evalInputDelta=215.97541235170377
Fitness changed from -696.1946865172325 to -912.1700988689363
Iteration 11 complete. Error: -912.1700988689363 Total: 2.9824; Orientation: 0.3083; Line Search: 2.1066
Adding measurement bcab99e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.334e+06, gradient 1.461e-01, dot -0.170; [b2eda548-4e33-467f-8600-0bf691696280 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -912.1700988689363, -148.35280505348211, -142.1482850498263, -138.30474729740843
LBFGS Accumulation History: 3 points
Removed measurement bcab99e to history. Total: 3
th(0)=-912.1700988689363;dx=-0.021307129208573167
Armijo: th(150000.00000000006)=-773.2843990182811; dx=2.5789961459727283E-4 evalInputDelta=-138.88569985065521
New Minimum: -912.1700988689363 > -1121.9827012368783
END: th(75000.00000000003)=-1121.9827012368783; dx=-0.002770715890121335 evalInputDelta=209.81260236794196
Fitness changed from -912.1700988689363 to -1121.9827012368783
Iteration 12 complete. Error: -1121.9827012368783 Total: 2.7650; Orientation: 0.2834; Line Search: 1.8948
Adding measurement 3bf2d1e1 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.072e+05, gradient 1.429e-01, dot 0.198; [b2eda548-4e33-467f-8600-0bf691696280 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1121.9827012368783;dx=-3028.727280244523
Armijo: th(161582.60175239135)=84.81314487844043; dx=0.004416488481073271 evalInputDelta=-1206.7958461153187
Armijo: th(80791.30087619567)=83.53449142785007; dx=0.008789271131007474 evalInputDelta=-1205.5171926647283
Armijo: th(26930.433625398557)=80.61370154328517; dx=0.0262484226472358 evalInputDelta=-1202.5964027801633
Armijo: th(6732.608406349639)=76.13526322491191; dx=0.10499011065200703 evalInputDelta=-1198.11796446179
Armijo: th(1346.5216812699277)=69.41753086555696; dx=0.5182993897959893 evalInputDelta=-1191.4002321024352
Armijo: th(224.4202802116546)=55.214647752598125; dx=3.0605894267934035 evalInputDelta=-1177.1973489894763
Armijo: th(32.06004003023637)=18.134962389671387; dx=20.173829740432552 evalInputDelta=-1140.1176636265495
Armijo: th(4.0075050037795465)=-133.56224537129265; dx=128.1598973159816 evalInputDelta=-988.4204558655856
Armijo: th(0.44527833375328296)=-778.4484666621172; dx=259.89441145933597 evalInputDelta=-343.53423457476106
New Minimum: -1121.9827012368783 > -1129.5645234595668
END: th(0.0445278333753283)=-1129.5645234595668; dx=-1013.9311885224988 evalInputDelta=7.5818222226885155
Fitness changed from -1121.9827012368783 to -1129.5645234595668
Iteration 13 complete. Error: -1129.5645234595668 Total: 7.9347; Orientation: 0.2947; Line Search: 7.0688
Adding measurement 7972ac42 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 3.126e+05, gradient 1.383e-01, dot -0.157; [b2eda548-4e33-467f-8600-0bf691696280 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1129.5645234595668, -1121.9827012368783, -148.35280505348211, -142.1482850498263, -138.30474729740843
Rejected: LBFGS Orientation magnitude: 3.262e+05, gradient 1.383e-01, dot -0.158; [b2eda548-4e33-467f-8600-0bf691696280 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1129.5645234595668, -1121.9827012368783, -148.35280505348211, -142.1482850498263
LBFGS Accumulation History: 3 points
Removed measurement 7972ac42 to history. Total: 4
Removed measurement 3bf2d1e1 to history. Total: 3
th(0)=-1129.5645234595668;dx=-0.01911478202513297
New Minimum: -1129.5645234595668 > -1129.5655886744437
END: th(0.09593230889576679)=-1129.5655886744437; dx=-0.015190746282277323 evalInputDelta=0.001065214876916798
Fitness changed from -1129.5645234595668 to -1129.5655886744437
Iteration 14 complete. Error: -1129.5655886744437 Total: 2.4048; Orientation: 0.6331; Line Search: 1.2337
Adding measurement 288eba39 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.550e+08, gradient 1.383e-01, dot -0.173; [b2eda548-4e33-467f-8600-0bf691696280 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1129.5655886744437, -148.35280505348211, -142.1482850498263, -138.30474729740843
LBFGS Accumulation History: 3 points
Removed measurement 288eba39 to history. Total: 3
th(0)=-1129.5655886744437;dx=-0.019117066008772457
New Minimum: -1129.5655886744437 > -1129.5676081158708
END: th(0.20667989417989424)=-1129.5676081158708; dx=-0.015192512059521403 evalInputDelta=0.0020194414271372807
Fitness changed from -1129.5655886744437 to -1129.5676081158708
Iteration 15 complete. Error: -1129.5676081158708 Total: 2.0632; Orientation: 0.2966; Line Search: 1.2003
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/d3c25373-bcd1-432f-a4bc-949863975d6b.jpg)
Final threshold in iteration 16: -1129.5676081158708 (> -Infinity) after 43.791s (< 5400.000s)

Returns

    -1129.5676081158708