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 122.14 seconds (1.182 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: 40418164704200
Reset training subject: 40420373453200
Adding measurement 2922bf92 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-40.957655903610174;dx=-1.7142928725710135E-6
New Minimum: -40.957655903610174 > -40.957660173968286
WOLFE (weak): th(2.154434690031884)=-40.957660173968286; dx=-1.6749861115067686E-6 evalInputDelta=4.270358111568839E-6
New Minimum: -40.957660173968286 > -40.95766444432596
WOLFE (weak): th(4.308869380063768)=-40.95766444432596; dx=-1.6757168749715806E-6 evalInputDelta=8.540715782601183E-6
New Minimum: -40.95766444432596 > -40.95768152575218
WOLFE (weak): th(12.926608140191302)=-40.95768152575218; dx=-1.6746501821837292E-6 evalInputDelta=2.5622142004522175E-5
New Minimum: -40.95768152575218 > -40.957754121734155
WOLFE (weak): th(51.70643256076521)=-40.957754121734155; dx=-1.6752244408129687E-6 evalInputDelta=9.821812398058682E-5
New Minimum: -40.957754121734155 > -40.95813631610558
WOLFE (weak): th(258.53216280382605)=-40.95813631610558; dx=-1.673464312921892E-6 evalInputDelta=4.804124954063127E-4
New Minimum: -40.95813631610558 > -40.960519078798875
WOLFE (weak): th(1551.1929768229563)=-40.960519078798875; dx=-1.6753987992376978E-6 evalInputDelta=0.0028631751887004953
New Minimum: -40.960519078798875 > -40.977687526381025
WOLFE (weak): th(10858.350837760694)=-40.977687526381025; dx=-1.6750100793401653E-6 evalInputDelta=0.020031622770851243
New Minimum: -40.977687526381025 > -41.1175420529716
WOLFE (weak): th(86866.80670208555)=-41.1175420529716; dx=-1.6641673150026917E-6 evalInputDelta=0.15988614936142653
New Minimum: -41.1175420529716 > -42.35137111048344
WOLFE (weak): th(781801.26031877)=-42.35137111048344; dx=-1.5588559555859459E-6 evalInputDelta=1.3937152068732672
New Minimum: -42.35137111048344 > -50.68276273617674
END: th(7818012.6031877)=-50.68276273617674; dx=-6.862744150526282E-7 evalInputDelta=9.725106832566567
Fitness changed from -40.957655903610174 to -50.68276273617674
Iteration 1 complete. Error: -50.68276273617674 Total: 32.5066; Orientation: 0.0646; Line Search: 26.0730
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0aac564b-a674-4bb5-bd0d-77bbd3cd2727.jpg)
Adding measurement 41bb3cfa to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-50.68276273617674;dx=-8.112598226470511E-7
New Minimum: -50.68276273617674 > -60.22210267832844
END: th(1.684339755941405E7)=-60.22210267832844; dx=-3.1487477262637537E-7 evalInputDelta=9.539339942151699
Fitness changed from -50.68276273617674 to -60.22210267832844
Iteration 2 complete. Error: -60.22210267832844 Total: 7.1375; Orientation: 0.0617; Line Search: 4.3399
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/f9853994-3e4a-4a5b-b175-266965765c6f.jpg)
Adding measurement cecf41b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-60.22210267832844;dx=-6.583824543847474E-7
New Minimum: -60.22210267832844 > -68.39248592938648
END: th(3.6288E7)=-68.39248592938648; dx=-2.0299317175496247E-8 evalInputDelta=8.170383251058041
Fitness changed from -60.22210267832844 to -68.39248592938648
Iteration 3 complete. Error: -68.39248592938648 Total: 7.1732; Orientation: 0.0590; Line Search: 4.4292
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/66398a29-8de5-4a77-af99-409bed755563.jpg)
Adding measurement 2999e224 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.814e+04, gradient 9.661e-04, dot -0.471; [1b3dc046-f76c-44c5-b7f1-8982c42717ed = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.39248592938648, -60.22210267832844, -50.68276273617674, -40.957655903610174
LBFGS Accumulation History: 3 points
Removed measurement 2999e224 to history. Total: 3
th(0)=-68.39248592938648;dx=-9.329404441145766E-7
Armijo: th(7.8180126031877E7)=-61.58219220243747; dx=2.0622562691717975E-7 evalInputDelta=-6.810293726949013
New Minimum: -68.39248592938648 > -73.22362591276168
WOLF (strong): th(3.90900630159385E7)=-73.22362591276168; dx=2.7132852967179193E-7 evalInputDelta=4.831139983375195
New Minimum: -73.22362591276168 > -76.768445377398
END: th(1.3030021005312832E7)=-76.768445377398; dx=-2.55664995437752E-7 evalInputDelta=8.375959448011514
Fitness changed from -68.39248592938648 to -76.768445377398
Iteration 4 complete. Error: -76.768445377398 Total: 13.0155; Orientation: 1.1304; Line Search: 9.3373
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/94e429d9-a948-4a8a-a25a-4113846ddc5c.jpg)
Adding measurement 4ad630d3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.101e+04, gradient 6.480e-04, dot -0.595; [1b3dc046-f76c-44c5-b7f1-8982c42717ed = 1.000/1.000e+00]
Orientation rejected. Popping history element from -76.768445377398, -60.22210267832844, -50.68276273617674, -40.957655903610174
LBFGS Accumulation History: 3 points
Removed measurement 4ad630d3 to history. Total: 3
th(0)=-76.768445377398;dx=-4.1937108909887374E-7
New Minimum: -76.768445377398 > -83.64414438838324
END: th(2.807232926569009E7)=-83.64414438838324; dx=-8.206034906749612E-8 evalInputDelta=6.875699010985244
Fitness changed from -76.768445377398 to -83.64414438838324
Iteration 5 complete. Error: -83.64414438838324 Total: 8.7162; Orientation: 1.1941; Line Search: 4.7285
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/faeb9b82-2f6d-4e29-ba0d-5c1322274402.jpg)
Adding measurement 334a878e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.483e+04, gradient 7.177e-04, dot -0.505; [1b3dc046-f76c-44c5-b7f1-8982c42717ed = 1.000/1.000e+00]
Orientation rejected. Popping history element from -83.64414438838324, -60.22210267832844, -50.68276273617674, -40.957655903610174
LBFGS Accumulation History: 3 points
Removed measurement 334a878e to history. Total: 3
th(0)=-83.64414438838324;dx=-5.145358021189056E-7
Armijo: th(6.048000000000001E7)=-81.83778092391745; dx=1.6489697927711265E-7 evalInputDelta=-1.8063634644657895
New Minimum: -83.64414438838324 > -87.4990581401199
WOLF (strong): th(3.0240000000000004E7)=-87.4990581401199; dx=1.0593423983364438E-7 evalInputDelta=3.8549137517366603
New Minimum: -87.4990581401199 > -87.52465260290148
END: th(1.0080000000000002E7)=-87.52465260290148; dx=-2.116827643956136E-7 evalInputDelta=3.880508214518244
Fitness changed from -83.64414438838324 to -87.52465260290148
Iteration 6 complete. Error: -87.52465260290148 Total: 13.0377; Orientation: 1.0943; Line Search: 9.1695
Adding measurement 2a3a6fba to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.734e+04, gradient 5.094e-04, dot -0.683; [1b3dc046-f76c-44c5-b7f1-8982c42717ed = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.52465260290148, -60.22210267832844, -50.68276273617674, -40.957655903610174
LBFGS Accumulation History: 3 points
Removed measurement 2a3a6fba to history. Total: 3
th(0)=-87.52465260290148;dx=-2.59082582769113E-7
New Minimum: -87.52465260290148 > -91.97562277620261
END: th(2.1716701675521392E7)=-91.97562277620261; dx=-1.529264470288335E-7 evalInputDelta=4.45097017330113
Fitness changed from -87.52465260290148 to -91.97562277620261
Iteration 7 complete. Error: -91.97562277620261 Total: 8.7707; Orientation: 1.4393; Line Search: 4.9162
Adding measurement 507130bf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.539e+04, gradient 5.256e-04, dot -0.630; [1b3dc046-f76c-44c5-b7f1-8982c42717ed = 1.000/1.000e+00]
Orientation rejected. Popping history element from -91.97562277620261, -60.22210267832844, -50.68276273617674, -40.957655903610174
LBFGS Accumulation History: 3 points
Removed measurement 507130bf to history. Total: 3
th(0)=-91.97562277620261;dx=-2.756055132176645E-7
New Minimum: -91.97562277620261 > -96.1098803196812
END: th(4.678721544281682E7)=-96.1098803196812; dx=-4.4609021372388246E-9 evalInputDelta=4.134257543478583
Fitness changed from -91.97562277620261 to -96.1098803196812
Iteration 8 complete. Error: -96.1098803196812 Total: 8.4478; Orientation: 1.1935; Line Search: 5.0399
Adding measurement 20744256 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.180e+04, gradient 7.544e-04, dot -0.376; [1b3dc046-f76c-44c5-b7f1-8982c42717ed = 1.000/1.000e+00]
Orientation rejected. Popping history element from -96.1098803196812, -60.22210267832844, -50.68276273617674, -40.957655903610174
LBFGS Accumulation History: 3 points
Removed measurement 20744256 to history. Total: 3
th(0)=-96.1098803196812;dx=-5.671651647059472E-7
Armijo: th(1.0080000000000003E8)=-78.94747311107582; dx=1.9871020076467635E-7 evalInputDelta=-17.162407208605373
Armijo: th(5.0400000000000015E7)=-93.79850667966895; dx=2.8815309853363077E-7 evalInputDelta=-2.311373640012249
New Minimum: -96.1098803196812 > -101.77258327194278
END: th(1.6800000000000004E7)=-101.77258327194278; dx=-6.039770307791241E-8 evalInputDelta=5.662702952261583
Fitness changed from -96.1098803196812 to -101.77258327194278
Iteration 9 complete. Error: -101.77258327194278 Total: 12.6421; Orientation: 1.1988; Line Search: 9.1695
Adding measurement 4acafe2e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.370e+04, gradient 5.081e-04, dot -0.523; [1b3dc046-f76c-44c5-b7f1-8982c42717ed = 1.000/1.000e+00]
Orientation rejected. Popping history element from -101.77258327194278, -60.22210267832844, -50.68276273617674, -40.957655903610174
LBFGS Accumulation History: 3 points
Removed measurement 4acafe2e to history. Total: 3
th(0)=-101.77258327194278;dx=-2.576186049931776E-7
New Minimum: -101.77258327194278 > -104.56031158069159
WOLF (strong): th(3.6194502792535655E7)=-104.56031158069159; dx=4.673566603751678E-8 evalInputDelta=2.787728308748811
New Minimum: -104.56031158069159 > -104.71662083143055
END: th(1.8097251396267828E7)=-104.71662083143055; dx=-7.404131225871654E-8 evalInputDelta=2.944037559487768
Fitness changed from -101.77258327194278 to -104.71662083143055
Iteration 10 complete. Error: -104.71662083143055 Total: 10.2505; Orientation: 1.1538; Line Search: 6.8394
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/90d28fa2-8007-4541-9bde-231b65e1d341.jpg)
Final threshold in iteration 11: -104.71662083143055 (> -Infinity) after 122.141s (< 5400.000s)

Returns

    -104.71662083143055