Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Code from BasicOptimizer.scala:88 executed in 515.43 seconds (8.542 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: 603885681834000
    Reset training subject: 603896781106000
    Adding measurement 2da8ab92 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=13.565641298890114;dx=-1.2603560667942381E-6
    New Minimum: 13.565641298890114 > 13.565637104213238
    WOLFE (weak): th(2.154434690031884)=13.565637104213238; dx=-1.2592245702830396E-6 evalInputDelta=4.194676876068115E-6
    New Minimum: 13.565637104213238 > 13.565633073449135
    WOLFE (weak): th(4.308869380063768)=13.565633073449135; dx=-1.2591074808857165E-6 evalInputDelta=8.225440979003906E-6
    New Minimum: 13.565633073449135 > 13.56561777740717
    WOLFE (weak): th(12.926608140191302)=13.56561777740717; dx=-1.259019666787854E-6 evalInputDelta=2.3521482944488525E-5
    New Minimum: 13.56561777740717 > 13.565547354519367
    WOLFE (weak): th(51.70643256076521)=13.565547354519367; dx=-1.2592423429765788E-6 evalInputDelta=9.394437074661255E-5
    New Minimum: 13.565547354519367 > 13.565173201262951
    WOLFE (weak): th(258.53216280382605)=13.565173201262951; dx=-1.2593545906605995E-6 evalInputDelta=4.6809762716293335E-4
    New Minimum: 13.565173201262951 > 13.56283250451088
    WOLFE (weak): th(1551.1929768229563)=13.56283250451088; dx=-1.2591045897295533E-6 evalInputDelta=0.002808794379234314
    New Minimum: 13.56283250451088 > 13.545991338789463
    WOLFE (weak): th(10858.350837760694)=13.545991338789463; dx=-1.2576796290881303E-6 evalInputDelta=0.019649960100650787
    New Minimum: 13.545991338789463 > 13.409324951469898
    WOLFE (weak): th(86866.80670208555)=13.409324951469898; dx=-1.241865004347998E-6 evalInputDelta=0.1563163474202156
    New Minimum: 13.409324951469898 > 12.297619216144085
    END: th(781801.26031877)=12.297619216144085; dx=-9.545411296968175E-7 evalInputDelta=1.268022082746029
    Fitness changed from 13.565641298890114 to 12.297619216144085
    Iteration 1 complete. Error: 12.297619216144085 Total: 143.4762; Orientation: 0.0284; Line Search: 110.2764
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/15211e

...skipping 5916 bytes...

    te. Error: 4.2924002557992935 Total: 44.5656; Orientation: 0.4321; Line Search: 33.1453
    Adding measurement a6aaca8 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.639e+03, gradient 3.626e-04, dot -0.414; [d573d449-d2c7-4d98-adf4-dd3a8b25affa = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 4.2924002557992935, 10.670329570770264, 12.297619216144085, 13.565641298890114
    LBFGS Accumulation History: 3 points
    Removed measurement a6aaca8 to history. Total: 3
    th(0)=4.2924002557992935;dx=-1.3139053829893768E-7
    New Minimum: 4.2924002557992935 > 4.004431277513504
    WOLF (strong): th(5040000.000000001)=4.004431277513504; dx=2.4660388855546858E-8 evalInputDelta=0.2879689782857895
    New Minimum: 4.004431277513504 > 3.9611362665891647
    END: th(2520000.0000000005)=3.9611362665891647; dx=-3.886683361504908E-8 evalInputDelta=0.3312639892101288
    Fitness changed from 4.2924002557992935 to 3.9611362665891647
    Iteration 9 complete. Error: 3.9611362665891647 Total: 44.3694; Orientation: 0.4040; Line Search: 33.1017
    Adding measurement 71098858 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.812e+03, gradient 2.864e-04, dot -0.496; [d573d449-d2c7-4d98-adf4-dd3a8b25affa = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 3.9611362665891647, 10.670329570770264, 12.297619216144085, 13.565641298890114
    LBFGS Accumulation History: 3 points
    Removed measurement 71098858 to history. Total: 3
    th(0)=3.9611362665891647;dx=-8.195555622021435E-8
    New Minimum: 3.9611362665891647 > 3.7726880609989166
    END: th(5429175.418880348)=3.7726880609989166; dx=-7.46142757120234E-9 evalInputDelta=0.1884482055902481
    Fitness changed from 3.9611362665891647 to 3.7726880609989166
    Iteration 10 complete. Error: 3.7726880609989166 Total: 33.4944; Orientation: 0.4128; Line Search: 22.3612
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/5239f80f-e8e5-4cd9-8e22-6335261a59d8.jpg)
    
    Final threshold in iteration 11: 3.7726880609989166 (> -Infinity) after 515.430s (< 3600.000s)
    

Returns:

    3.7726880609989166