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

Iteration 20 Iteration 20

Iteration 25 Iteration 25

Iteration 30 Iteration 30

Code from BasicOptimizer.scala:75 executed in 570.20 seconds (5.146 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    IterativeTrainer.wrap(trainable)
      .setOrientation(orientation())
      .setMonitor(new TrainingMonitor() {
        override def clear(): Unit = trainingMonitor.clear()
  
        override def log(msg: String): Unit = trainingMonitor.log(msg)
  
        override def onStepFail(currentPoint: Step): Boolean = {
          BasicOptimizer.this.onStepFail(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, currentPoint)
          trainingMonitor.onStepComplete(currentPoint)
          super.onStepComplete(currentPoint)
        }
      })
      .setTimeout(trainingMinutes, TimeUnit.MINUTES)
      .setMaxIterations(trainingIterations)
      .setLineSearchFactory((_: CharSequence) => lineSearchInstance)
      .setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
      .runAndFree
      .asInstanceOf[lang.Double]

Logging:

    Reset training subject: 928864130352800
    Reset training subject: 928868190577200
    Adding measurement 67c008f8 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=3.4613749922718853;dx=-4.835565898707886E-4
    New Minimum: 3.4613749922718853 > 3.4607213311828673
    WOLFE (weak): th(2.154434690031884)=3.4607213311828673; dx=-4.83179444586516E-4 evalInputDelta=6.536610890179873E-4
    New Minimum: 3.4607213311828673 > 3.4600705297198147
    WOLFE (weak): th(4.308869380063768)=3.4600705297198147; dx=-4.7901240587516086E-4 evalInputDelta=0.0013044625520706177
    New Minimum: 3.4600705297198147 > 3.457485921215266
    WOLFE (weak): th(12.926608140191302)=3.457485921215266; dx=-4.826315358614259E-4 evalInputDelta=0.0038890710566192865
    New Minimum: 3.457485921215266 > 3.4460966498591006
    WOLFE (weak): th(51.70643256076521)=3.4460966498591006; dx=-4.5174936164529123E-4 evalInputDelta=0.015278342412784696
    New Minimum: 3.4460966498591006 > 3.396742850076407
    END: th(258.53216280382605)=3.396742850076407; dx=-3.4769882212382487E-4 evalInputDelta=0.06463214219547808
    Fitness changed from 3.4613749922718853 to 3.396742850076407
    Iteration 1 complete. Error: 3.396742850076407 Total: 35.6081; Orientation: 0.0754; Line Search: 23.8435
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/6054e627-17d0-4d25-87ad-35d4b69f8ea8.jpg)
    
    Adding measurement 59e77d15 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=3.396742850076407;dx=-3.630608493112847E-4
    New Minimum: 3.396742850076407 > 3.3009013736154884
    END: th(556.9906600335335)=3.3009013736154884; dx=-2.4102226904224697E-4 evalInputDelta=0.09584147646091878
    Fitness changed from 3.396742850076407 to 3.3009013736154884
    Iteration 2 complete. Error: 3.3009013736154884 Total: 12.6247; Orientation: 0.0643; Line Search: 7.8970
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/6b470cac-a784-4bd6-a3c3-b0ccea6080f4.jpg)
    
    Adding measurement 2bc1f72e to history. Total: 2
    LBFGS Accumulation History: 3

...skipping 25152 bytes...

    -49d7-859b-6769c556ed50 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.625655697658658, 2.6256542683113366, 2.62565355328843, 2.625652123708278
    LBFGS Accumulation History: 3 points
    Removed measurement 565575f9 to history. Total: 4
    th(0)=2.625652123708278;dx=-5.413328489325466E-5
    New Minimum: 2.625652123708278 > 2.6256514098495245
    WOLF (strong): th(0.07710608675392784)=2.6256514098495245; dx=3.093517013811196E-5 evalInputDelta=7.138587534427643E-7
    New Minimum: 2.6256514098495245 > 2.6256509323138744
    END: th(0.03855304337696392)=2.6256509323138744; dx=-1.1684076750755012E-5 evalInputDelta=1.1913944035768509E-6
    Fitness changed from 2.625652123708278 to 2.6256509323138744
    Iteration 29 complete. Error: 2.6256509323138744 Total: 17.9710; Orientation: 1.8451; Line Search: 11.8572
    Adding measurement 6c702ec0 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.209e-03, gradient 1.054e-02, dot -0.603; [1af6660e-ce58-49d7-859b-6769c556ed50 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 2.6256542683113366, 2.62565355328843, 2.625652123708278, 2.6256509323138744
    LBFGS Accumulation History: 3 points
    Removed measurement 5dcbb479 to history. Total: 4
    th(0)=2.6256509323138744;dx=-1.111201290349824E-4
    Armijo: th(0.08306001405763504)=2.6256614236626774; dx=4.5814135744912755E-4 evalInputDelta=-1.0491348803043365E-5
    Armijo: th(0.04153000702881752)=2.625651170965284; dx=1.3711968021390557E-4 evalInputDelta=-2.3865140974521637E-7
    New Minimum: 2.6256509323138744 > 2.625650217058137
    END: th(0.013843335676272507)=2.625650217058137; dx=-3.157469267057889E-5 evalInputDelta=7.152557373046875E-7
    Fitness changed from 2.6256509323138744 to 2.625650217058137
    Iteration 30 complete. Error: 2.625650217058137 Total: 21.7337; Orientation: 1.9506; Line Search: 15.9295
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/c439f4cf-df8d-4fc6-badc-7818d25a4044.jpg)
    
    Final threshold in iteration 31: 2.625650217058137 (> -Infinity) after 570.200s (< 3600.000s)
    

Returns:

    2.625650217058137