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 55.46 seconds (0.550 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: 163447020541600
Reset training subject: 163447897048500
Adding measurement 2fa4c643 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-32.63926741432396;dx=-0.036880330341546086
New Minimum: -32.63926741432396 > -32.72690099639935
WOLFE (weak): th(2.154434690031884)=-32.72690099639935; dx=-0.0369123069172085 evalInputDelta=0.08763358207539085
New Minimum: -32.72690099639935 > -32.8143619263397
WOLFE (weak): th(4.308869380063768)=-32.8143619263397; dx=-0.036936355972860394 evalInputDelta=0.17509451201573967
New Minimum: -32.8143619263397 > -33.16444806165745
WOLFE (weak): th(12.926608140191302)=-33.16444806165745; dx=-0.03690309522963975 evalInputDelta=0.5251806473334923
New Minimum: -33.16444806165745 > -34.74089359098295
WOLFE (weak): th(51.70643256076521)=-34.74089359098295; dx=-0.036635169248537935 evalInputDelta=2.101626176658989
New Minimum: -34.74089359098295 > -42.54873842549932
END: th(258.53216280382605)=-42.54873842549932; dx=-0.03049569554448433 evalInputDelta=9.909471011175363
Fitness changed from -32.63926741432396 to -42.54873842549932
Iteration 1 complete. Error: -42.54873842549932 Total: 7.5157; Orientation: 0.0146; Line Search: 4.9770
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/99fe32f5-21be-47b6-b23d-1f215b5b5702.jpg)
Adding measurement 1f4692f5 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-42.54873842549932;dx=-0.033845220543683954
New Minimum: -42.54873842549932 > -58.59454791123382
END: th(556.9906600335335)=-58.59454791123382; dx=-0.021520435328508808 evalInputDelta=16.045809485734495
Fitness changed from -42.54873842549932 to -58.59454791123382
Iteration 2 complete. Error: -58.59454791123382 Total: 2.6629; Orientation: 0.0139; Line Search: 1.6862
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d14f209f-70b2-4726-8710-d889504c6f51.jpg)
Adding measurement 3c58d6d9 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-58.59454791123382;dx=-0.031002310576512863
New Minimum: -58.59454791123382 > -84.77511035638645
END: th(1200.0)=-84.77511035638645; dx=-0.013202523251356334 evalInputDelta=26.18056244515263
Fitness changed from -58.59454791123382 to -84.77511035638645
Iteration 3 complete. Error: -84.77511035638645 Total: 2.5389; Orientation: 0.0141; Line Search: 1.6362
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/29335b88-8240-4877-88ac-5502191395e5.jpg)
Adding measurement 25e6cf37 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.620e+03, gradient 1.781e-01, dot -0.417; [4c07f869-6c42-4aa1-a6a6-5d981b2cf415 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.77511035638645, -58.59454791123382, -42.54873842549932, -32.63926741432396
LBFGS Accumulation History: 3 points
Removed measurement 25e6cf37 to history. Total: 3
th(0)=-84.77511035638645;dx=-0.03169096299171427
New Minimum: -84.77511035638645 > -113.08778307000054
END: th(2585.3216280382608)=-113.08778307000054; dx=-8.311866640153566E-4 evalInputDelta=28.31267271361409
Fitness changed from -84.77511035638645 to -113.08778307000054
Iteration 4 complete. Error: -113.08778307000054 Total: 2.8610; Orientation: 0.2801; Line Search: 1.6512
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a21e16fe-9c22-490b-8282-f8fac1b986f5.jpg)
Adding measurement 3ab4d1c3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.082e+03, gradient 2.664e-01, dot -0.179; [4c07f869-6c42-4aa1-a6a6-5d981b2cf415 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -113.08778307000054, -58.59454791123382, -42.54873842549932, -32.63926741432396
LBFGS Accumulation History: 3 points
Removed measurement 3ab4d1c3 to history. Total: 3
th(0)=-113.08778307000054;dx=-0.07063496829605942
Armijo: th(5569.9066003353355)=-102.88217623816091; dx=0.004257688277729252 evalInputDelta=-10.205606831839631
New Minimum: -113.08778307000054 > -125.56537764248552
WOLF (strong): th(2784.9533001676677)=-125.56537764248552; dx=0.00534909524634479 evalInputDelta=12.477594572484975
New Minimum: -125.56537764248552 > -137.75335323731687
END: th(928.3177667225559)=-137.75335323731687; dx=-0.004537224195356165 evalInputDelta=24.665570167316332
Fitness changed from -113.08778307000054 to -137.75335323731687
Iteration 5 complete. Error: -137.75335323731687 Total: 4.7539; Orientation: 0.2756; Line Search: 3.5041
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/38a0781c-b379-4e86-9ffd-bb20baf6f725.jpg)
Adding measurement 6e2d3e10 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.883e+03, gradient 2.102e-01, dot -0.234; [4c07f869-6c42-4aa1-a6a6-5d981b2cf415 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -137.75335323731687, -58.59454791123382, -42.54873842549932, -32.63926741432396
LBFGS Accumulation History: 3 points
Removed measurement 6e2d3e10 to history. Total: 3
th(0)=-137.75335323731687;dx=-0.04395139210011642
New Minimum: -137.75335323731687 > -155.56111263945434
END: th(2000.0000000000005)=-155.56111263945434; dx=-4.889879362300468E-4 evalInputDelta=17.807759402137464
Fitness changed from -137.75335323731687 to -155.56111263945434
Iteration 6 complete. Error: -155.56111263945434 Total: 2.8576; Orientation: 0.2839; Line Search: 1.6765
Adding measurement 3a70c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.649e+03, gradient 2.468e-01, dot -0.173; [4c07f869-6c42-4aa1-a6a6-5d981b2cf415 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -155.56111263945434, -58.59454791123382, -42.54873842549932, -32.63926741432396
LBFGS Accumulation History: 3 points
Removed measurement 3a70c to history. Total: 3
th(0)=-155.56111263945434;dx=-0.06068982330207806
Armijo: th(4308.869380063768)=-144.24951933412117; dx=0.0046266847210413055 evalInputDelta=-11.311593305333162
New Minimum: -155.56111263945434 > -165.2864405263632
WOLF (strong): th(2154.434690031884)=-165.2864405263632; dx=0.007595943022661781 evalInputDelta=9.725327886908872
New Minimum: -165.2864405263632 > -180.79787898887255
END: th(718.1448966772947)=-180.79787898887255; dx=-0.010783864039972639 evalInputDelta=25.236766349418218
Fitness changed from -155.56111263945434 to -180.79787898887255
Iteration 7 complete. Error: -180.79787898887255 Total: 4.6395; Orientation: 0.2866; Line Search: 3.5756
Adding measurement 5a2793bc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.673e+03, gradient 1.738e-01, dot -0.307; [4c07f869-6c42-4aa1-a6a6-5d981b2cf415 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -180.79787898887255, -58.59454791123382, -42.54873842549932, -32.63926741432396
LBFGS Accumulation History: 3 points
Removed measurement 5a2793bc to history. Total: 3
th(0)=-180.79787898887255;dx=-0.030122474661256265
New Minimum: -180.79787898887255 > -200.14973886755385
END: th(1547.1962778709267)=-200.14973886755385; dx=-0.006091225370288563 evalInputDelta=19.351859878681296
Fitness changed from -180.79787898887255 to -200.14973886755385
Iteration 8 complete. Error: -200.14973886755385 Total: 2.7105; Orientation: 0.2674; Line Search: 1.6647
Adding measurement 32b5ccc6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.592e+03, gradient 2.103e-01, dot -0.244; [4c07f869-6c42-4aa1-a6a6-5d981b2cf415 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -200.14973886755385, -58.59454791123382, -42.54873842549932, -32.63926741432396
LBFGS Accumulation History: 3 points
Removed measurement 32b5ccc6 to history. Total: 3
th(0)=-200.14973886755385;dx=-0.04380198552717408
Armijo: th(3333.3333333333344)=-188.04177976582758; dx=0.005907746705879896 evalInputDelta=-12.107959101726266
New Minimum: -200.14973886755385 > -210.34833461427738
WOLF (strong): th(1666.6666666666672)=-210.34833461427738; dx=0.004905137958100287 evalInputDelta=10.198595746723527
New Minimum: -210.34833461427738 > -215.59055884360984
END: th(555.5555555555558)=-215.59055884360984; dx=-0.01628054397780679 evalInputDelta=15.440819976055991
Fitness changed from -200.14973886755385 to -215.59055884360984
Iteration 9 complete. Error: -215.59055884360984 Total: 4.3833; Orientation: 0.2711; Line Search: 3.3325
Adding measurement 11c0ff6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.845e+03, gradient 1.459e-01, dot -0.385; [4c07f869-6c42-4aa1-a6a6-5d981b2cf415 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -215.59055884360984, -58.59454791123382, -42.54873842549932, -32.63926741432396
LBFGS Accumulation History: 3 points
Removed measurement 11c0ff6 to history. Total: 3
th(0)=-215.59055884360984;dx=-0.0211184170317794
New Minimum: -215.59055884360984 > -231.76800091902246
END: th(1196.9081611288248)=-231.76800091902246; dx=-0.01393216762063935 evalInputDelta=16.177442075412614
Fitness changed from -215.59055884360984 to -231.76800091902246
Iteration 10 complete. Error: -231.76800091902246 Total: 2.9000; Orientation: 0.2770; Line Search: 1.8334
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/4a595798-a5af-464c-9f9f-69e5d51808a0.jpg)
Adding measurement 386211fe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.333e+04, gradient 1.569e-01, dot -0.376; [4c07f869-6c42-4aa1-a6a6-5d981b2cf415 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -231.76800091902246, -58.59454791123382, -42.54873842549932, -32.63926741432396
LBFGS Accumulation History: 3 points
Removed measurement 386211fe to history. Total: 3
th(0)=-231.76800091902246;dx=-0.024491112723068413
New Minimum: -231.76800091902246 > -247.38508222253418
END: th(2578.6604631182117)=-247.38508222253418; dx=-0.005235479704967043 evalInputDelta=15.617081303511725
Fitness changed from -231.76800091902246 to -247.38508222253418
Iteration 11 complete. Error: -247.38508222253418 Total: 2.8440; Orientation: 0.2761; Line Search: 1.6780
Adding measurement 63119f03 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.080e+03, gradient 2.151e-01, dot -0.233; [4c07f869-6c42-4aa1-a6a6-5d981b2cf415 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -247.38508222253418, -58.59454791123382, -42.54873842549932, -32.63926741432396
LBFGS Accumulation History: 3 points
Removed measurement 63119f03 to history. Total: 3
th(0)=-247.38508222253418;dx=-0.04611300269912092
Armijo: th(5555.555555555558)=-212.3287545293854; dx=0.004204895620846319 evalInputDelta=-35.05632769314877
Armijo: th(2777.777777777779)=-245.7583448481455; dx=0.006891153879288072 evalInputDelta=-1.6267373743886822
New Minimum: -247.38508222253418 > -270.5129386924034
END: th(925.9259259259264)=-270.5129386924034; dx=-0.007661385162778643 evalInputDelta=23.127856469869215
Fitness changed from -247.38508222253418 to -270.5129386924034
Iteration 12 complete. Error: -270.5129386924034 Total: 4.4194; Orientation: 0.2670; Line Search: 3.3426
Adding measurement 73bdce5d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.599e+04, gradient 1.737e-01, dot -0.346; [4c07f869-6c42-4aa1-a6a6-5d981b2cf415 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -270.5129386924034, -58.59454791123382, -42.54873842549932, -32.63926741432396
LBFGS Accumulation History: 3 points
Removed measurement 73bdce5d to history. Total: 3
th(0)=-270.5129386924034;dx=-0.03008169560215113
New Minimum: -270.5129386924034 > -283.00738451054593
END: th(1994.8469352147083)=-283.00738451054593; dx=-0.004068103954712765 evalInputDelta=12.494445818142538
Fitness changed from -270.5129386924034 to -283.00738451054593
Iteration 13 complete. Error: -283.00738451054593 Total: 3.1317; Orientation: 0.2537; Line Search: 1.7962
Adding measurement 74587ce7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.408e+04, gradient 2.342e-01, dot -0.240; [4c07f869-6c42-4aa1-a6a6-5d981b2cf415 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -283.00738451054593, -58.59454791123382, -42.54873842549932, -32.63926741432396
LBFGS Accumulation History: 3 points
Removed measurement 74587ce7 to history. Total: 3
th(0)=-283.00738451054593;dx=-0.054689762959749054
Armijo: th(4297.7674385303535)=-244.83576287227731; dx=0.008363146246138386 evalInputDelta=-38.17162163826862
Armijo: th(2148.8837192651768)=-282.3397360672068; dx=0.010827146429383747 evalInputDelta=-0.6676484433391465
New Minimum: -283.00738451054593 > -304.6989292728151
END: th(716.2945730883922)=-304.6989292728151; dx=-0.00855298673201061 evalInputDelta=21.69154476226919
Fitness changed from -283.00738451054593 to -304.6989292728151
Iteration 14 complete. Error: -304.6989292728151 Total: 4.4194; Orientation: 0.2644; Line Search: 3.3231
Adding measurement 42aefe6e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.625e+05, gradient 1.616e-01, dot -0.374; [4c07f869-6c42-4aa1-a6a6-5d981b2cf415 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -304.6989292728151, -58.59454791123382, -42.54873842549932, -32.63926741432396
LBFGS Accumulation History: 3 points
Removed measurement 42aefe6e to history. Total: 3
th(0)=-304.6989292728151;dx=-0.025849616543247675
New Minimum: -304.6989292728151 > -321.246315640351
END: th(1543.2098765432108)=-321.246315640351; dx=-0.009063649820425878 evalInputDelta=16.547386367535864
Fitness changed from -304.6989292728151 to -321.246315640351
Iteration 15 complete. Error: -321.246315640351 Total: 2.7217; Orientation: 0.2677; Line Search: 1.6785
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/a8902898-aa1d-4e70-b51e-54da065c2fac.jpg)
Final threshold in iteration 16: -321.246315640351 (> -Infinity) after 55.461s (< 5400.000s)

Returns

    -321.246315640351